aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/output.py')
-rw-r--r--gallery_dl/output.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/gallery_dl/output.py b/gallery_dl/output.py
index bd5d959..13b6a8a 100644
--- a/gallery_dl/output.py
+++ b/gallery_dl/output.py
@@ -10,7 +10,6 @@ import os
import sys
import shutil
import logging
-import functools
import unicodedata
from . import config, util, formatter
@@ -92,39 +91,6 @@ class LoggerAdapter():
self.logger._log(logging.ERROR, msg, args, **kwargs)
-class LoggerAdapterActions():
-
- def __init__(self, logger, job):
- self.logger = logger
- self.extra = job._logger_extra
- self.actions = job._logger_actions
-
- self.debug = functools.partial(self.log, logging.DEBUG)
- self.info = functools.partial(self.log, logging.INFO)
- self.warning = functools.partial(self.log, logging.WARNING)
- self.error = functools.partial(self.log, logging.ERROR)
-
- def log(self, level, msg, *args, **kwargs):
- msg = str(msg)
- if args:
- msg = msg % args
-
- actions = self.actions[level]
- if actions:
- args = self.extra.copy()
- args["level"] = level
-
- for cond, action in actions:
- if cond(msg):
- action(args)
-
- level = args["level"]
-
- if self.logger.isEnabledFor(level):
- kwargs["extra"] = self.extra
- self.logger._log(level, msg, (), **kwargs)
-
-
class PathfmtProxy():
__slots__ = ("job",)