def _init_logger(self): file_handler_path = record_log_file_path(self.data_path, self.id) file_handler = logging.FileHandler(file_handler_path) file_formatter = JSONFormatter() file_handler.setFormatter(file_formatter) self._logger_file_handler = file_handler logger_ = logging.getLogger(self._logger_namespace) logger_.setLevel(logging.INFO) self._logger = logger_ logger = logging.LoggerAdapter(logger_, self._log_extra(StepStatus.PROCESSING)) self.logger = logger
def setUp(self): json_handler.setFormatter(JSONFormatter())
def setUp(self): formatter = JSONFormatter() formatter.json_lib = simplejson json_handler.setFormatter(formatter)
def setUp(self): formatter = JSONFormatter() formatter.json_lib = ujson json_handler.setFormatter(formatter)