Prechádzať zdrojové kódy

CompatLogger: args/*args confusion

Ask Solem 14 rokov pred
rodič
commit
9b66d0f1b3
1 zmenil súbory, kde vykonal 6 pridanie a 6 odobranie
  1. 6 6
      celery/utils/compat.py

+ 6 - 6
celery/utils/compat.py

@@ -329,24 +329,24 @@ class _CompatLoggerAdapter(object):
         return msg, kwargs
 
     def debug(self, msg, *args, **kwargs):
-        self.log(logging.DEBUG, msg, args, **kwargs)
+        self.log(logging.DEBUG, msg, *args, **kwargs)
 
     def info(self, msg, *args, **kwargs):
-        self.log(logging.INFO, msg, args, **kwargs)
+        self.log(logging.INFO, msg, *args, **kwargs)
 
     def warning(self, msg, *args, **kwargs):
-        self.log(logging.WARNING, msg, args, **kwargs)
+        self.log(logging.WARNING, msg, *args, **kwargs)
     warn = warning
 
     def error(self, msg, *args, **kwargs):
-        self.log(logging.ERROR, msg, args, **kwargs)
+        self.log(logging.ERROR, msg, *args, **kwargs)
 
     def exception(self, msg, *args, **kwargs):
         kwargs.setdefault("exc_info", 1)
         self.error(msg, *args, **kwargs)
 
     def critical(self, msg, *args, **kwargs):
-        self.log(logging.CRITICAL, msg, args, **kwargs)
+        self.log(logging.CRITICAL, msg, *args, **kwargs)
     fatal = critical
 
     def log(self, level, msg, *args, **kwargs):
@@ -382,7 +382,7 @@ class _CompatLoggerAdapter(object):
             if not isinstance(exc_info, tuple):
                 exc_info = sys.exc_info()
         record = self.makeRecord(self.logger.name, level, fn, lno, msg,
-                                    args, exc_info, func, extra)
+                                 args, exc_info, func, extra)
         self.logger.handle(record)
 
     def isEnabledFor(self, level):