浏览代码

[desktop] logging Formatter cannot use logging

This creates an infinite loop and Hue will eventually run out of
stack space.
Erick Tryzelaar 10 年之前
父节点
当前提交
0db55b1
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      desktop/core/src/desktop/log/formatter.py

+ 0 - 4
desktop/core/src/desktop/log/formatter.py

@@ -20,8 +20,6 @@ import os
 
 from pytz import UnknownTimeZoneError, datetime, timezone
 
-LOG = logging.getLogger(__name__)
-
 class Formatter(logging.Formatter):
   def formatTime(self, record, datefmt=None):
     try:
@@ -32,8 +30,6 @@ class Formatter(logging.Formatter):
     try:
       ct = datetime.datetime.fromtimestamp(record.created, tz=tz)
     except (OverflowError, TypeError, ValueError):
-      LOG.exception('failed to format time: timestamp=%s tz=%s' % (record.created, tz))
-
       # Fallback to original.
       return super(Formatter, self).formatTime(record, datefmt=datefmt)