blob: 2d3fae550a6e2df051b8553f44f555a2695c4de6 (
plain)
1
2
3
4
5
6
7
8
|
from logging import Formatter
class UTF8LogFormatter(Formatter):
def format(self, record):
try:
return Formatter.format(self, record)
except Exception, e:
return Formatter.format(self, record).encode('utf8')
|