示例#1
0
文件: log.py 项目: zheel/moulinette
 def _log(self, *args, **kwargs):
     """Append action_id if available to the extra."""
     if self.action_id is not None:
         extra = kwargs.get('extra', {})
         if 'action_id' not in extra:
             # FIXME: Get real action_id instead of logger/current one
             extra['action_id'] = _get_action_id()
             kwargs['extra'] = extra
     return Logger._log(self, *args, **kwargs)
示例#2
0
 def _log(self, *args, **kwargs):
     """Append action_id if available to the extra."""
     if self.action_id is not None:
         extra = kwargs.get('extra', {})
         if 'action_id' not in extra:
             # FIXME: Get real action_id instead of logger/current one
             extra['action_id'] = _get_action_id()
             kwargs['extra'] = extra
     return Logger._log(self, *args, **kwargs)
示例#3
0
 def _log(self, level, msg, args, **kwargs):
     kwargs = self._proper_extra(kwargs)
     Logger._log(self, level, msg, args, **kwargs)
示例#4
0
 def _log(level, msg, args, **kwargs):
     new_args = keys_request()
     new_args.update(key_request_id())
     new_args.update(keys_timestamp())
     msg = msg % new_args
     Logger._log(self.app.logger, level, msg, args, **kwargs)
示例#5
0
文件: log.py 项目: Kryndex/pypi2nix-1
 def _log(self, level, msg, *args, **kwargs):
     indentation = '    ' * self._indent_level
     msg = '%s%s' % (indentation, msg)
     Logger._log(self, level, msg, *args, **kwargs)