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