[postprocessor] match logger names of downloader modules
The logger name for a postprocessor object got changed to "postprocessor.<module-name>" instead of just "postprocessor"
This commit is contained in:
@@ -8,23 +8,30 @@
|
|||||||
|
|
||||||
"""Common classes and constants used by postprocessor modules."""
|
"""Common classes and constants used by postprocessor modules."""
|
||||||
|
|
||||||
from . import log
|
import logging
|
||||||
|
|
||||||
|
|
||||||
class PostProcessor():
|
class PostProcessor():
|
||||||
"""Base class for postprocessors"""
|
"""Base class for postprocessors"""
|
||||||
log = log
|
|
||||||
|
|
||||||
def prepare(self, pathfmt):
|
def __init__(self):
|
||||||
""" """
|
name = self.__class__.__name__[:-2].lower()
|
||||||
|
self.log = logging.getLogger("postprocessor." + name)
|
||||||
|
|
||||||
def run(self, pathfmt):
|
@staticmethod
|
||||||
|
def prepare(pathfmt):
|
||||||
|
"""Update file paths, etc."""
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def run(pathfmt):
|
||||||
"""Execute the postprocessor for a file"""
|
"""Execute the postprocessor for a file"""
|
||||||
|
|
||||||
def run_after(self, pathfmt):
|
@staticmethod
|
||||||
|
def run_after(pathfmt):
|
||||||
"""Execute postprocessor after moving a file to its target location"""
|
"""Execute postprocessor after moving a file to its target location"""
|
||||||
|
|
||||||
def finalize(self):
|
@staticmethod
|
||||||
|
def finalize():
|
||||||
"""Cleanup"""
|
"""Cleanup"""
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user