mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
parent
08594e6407
commit
98022dffbb
@ -3,7 +3,7 @@
|
|||||||
# This file is part of gunicorn released under the MIT license.
|
# This file is part of gunicorn released under the MIT license.
|
||||||
# See the NOTICE for more information.
|
# See the NOTICE for more information.
|
||||||
|
|
||||||
import datetime
|
import time
|
||||||
import logging
|
import logging
|
||||||
logging.Logger.manager.emittedNoHandlerWarning = 1
|
logging.Logger.manager.emittedNoHandlerWarning = 1
|
||||||
from logging.config import fileConfig
|
from logging.config import fileConfig
|
||||||
@ -277,10 +277,7 @@ class Logger(object):
|
|||||||
|
|
||||||
def now(self):
|
def now(self):
|
||||||
""" return date in Apache Common Log Format """
|
""" return date in Apache Common Log Format """
|
||||||
now = datetime.datetime.now()
|
return time.strftime('[%d/%b/%Y:%H:%M:%S %z]')
|
||||||
month = util.monthname[now.month]
|
|
||||||
return '[%02d/%s/%04d:%02d:%02d:%02d]' % (now.day, month,
|
|
||||||
now.year, now.hour, now.minute, now.second)
|
|
||||||
|
|
||||||
def reopen_files(self):
|
def reopen_files(self):
|
||||||
for log in loggers():
|
for log in loggers():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user