This will allow log messages to include the action they originate from
in the future.
# Assume we'll run succesfully. If anything fails in the
# meanwhile, set this to True.
self.failed = False
+ # A logger object for this action. In the future, this might
+ # become a specific logger, that includes the action name and
+ # type.
+ self.log = log
def run(self, **kwargs):
"""
""" Testing handler that logs a configurable message """
-import logging as log
-
from backupninja.handlers import Action
class TestAction(Action):
def run(self, **kwargs):
- log.info(self.conf.get('main', 'message'))
+ self.log.info(self.conf.get('main', 'message'))
handler = TestAction