concurrent-log-handler
concurrent-log-handler copied to clipboard
when log file rotate, raise exception
[uWSGIWorker1Core0 31324 Fri Oct 27 14:01:32 2023] Unable to do rollover: 'ConcurrentRotatingFileHandler' object has no attribute 'rotation_filename':
File "/usr/lib/python2.7/site-packages/web/application.py", line 279, in wsgi
result = self.handle_with_processors()
File "/usr/lib/python2.7/site-packages/web/application.py", line 249, in handle_with_processors
return process(self.processors)
File "/usr/lib/python2.7/site-packages/web/application.py", line 237, in process
return p(lambda: process(processors))
File "/usr/lib/python2.7/site-packages/web/application.py", line 566, in processor
return handler()
File "/usr/lib/python2.7/site-packages/web/application.py", line 237, in
my conf file [loggers] keys=root,requestlog
[handlers] keys=consoleHandler,requestlogHandler
[formatters] keys=simpleFormatter
[formatter_simpleFormatter] format=[%(asctime)s]%(lineno)d : %(message)s
[logger_root] level=DEBUG handlers=consoleHandler
[handler_consoleHandler] class=StreamHandler level=DEBUG formatter=simpleFormatter args=(sys.stdout,)
[logger_requestlog] level=DEBUG handlers=consoleHandler,requestlogHandler qualname=requestlog propagate=0
[handler_requestlogHandler] class=concurrent_log_handler.ConcurrentRotatingFileHandler level=DEBUG formatter=simpleFormatter args=('log/aaa.log', 'a', 3000, 9, None, True)
I find rotation_filename not support in Python 2.7, I remove this call and fix the bug.
you are right, I changed version to 0.9.20 , now it works