Exemplo n.º 1
0
 def _log(self, message, message2='', level="info"):
     unmanic_logging = unlogger.UnmanicLogger.__call__()
     logger = unmanic_logging.get_logger(self.name)
     if logger:
         message = common.format_message(message, message2)
         getattr(logger, level)(message)
     else:
         print("Unmanic.{} - ERROR!!! Failed to find logger".format(self.name))
Exemplo n.º 2
0
    def _log(self, message, message2='', level="info"):
        """
        Generic logging method. Can be implemented on any unmanic class

        :param message:
        :param message2:
        :param level:
        :return:
        """
        unmanic_logging = unlogger.UnmanicLogger.__call__()
        logger = unmanic_logging.get_logger(__class__.__name__)
        if logger:
            message = common.format_message(message, message2)
            getattr(logger, level)(message)
        else:
            print("Unmanic.{} - ERROR!!! Failed to find logger".format(self.__name__))
Exemplo n.º 3
0
 def _log(self, message, message2='', level="info"):
     if not self.logger:
         unmanic_logging = unlogger.UnmanicLogger.__call__()
         self.logger = unmanic_logging.get_logger(self.name)
     message = common.format_message(message, message2)
     getattr(self.logger, level)(message)
Exemplo n.º 4
0
 def _log(self, message, message2='', level="info"):
     message = common.format_message(message, message2)
     getattr(self.logger, level)(message)