Pārlūkot izejas kodu

[desktop] logging Formatter cannot use logging

This creates an infinite loop and Hue will eventually run out of
stack space.
Erick Tryzelaar 10 gadi atpakaļ
vecāks
revīzija
0db55b1
1 mainītis faili ar 0 papildinājumiem un 4 dzēšanām
  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)