captcha
eric 2019-04-29 13:29:56 -04:00
parent 1554300013
commit 08ea4a11d7
1 changed files with 126 additions and 126 deletions

View File

@ -108,19 +108,19 @@ def main ():
cherrypy.log.error_file = ""
cherrypy.log.access_file = ""
# set up python logging
max_bytes = getattr(cherrypy.log, "rot_max_bytes", 100 * 1024 * 1024)
backup_count = getattr(cherrypy.log, "rot_backup_count", 2)
#print(os.path.abspath(error_file)+": Filehandler cherrypy")
h = logging.handlers.RotatingFileHandler(error_file, 'a', max_bytes, backup_count, 'utf-8')
h.setLevel (logging.DEBUG)
h.setLevel(logging.INFO)
h.setFormatter(cherrypy._cplogging.logfmt)
cherrypy.log.error_log.addHandler(h)
h = logging.handlers.RotatingFileHandler(access_file, 'a', max_bytes, backup_count, 'utf-8')
h.setLevel (logging.DEBUG)
h.setLevel(logging.INFO)
h.setFormatter(cherrypy._cplogging.logfmt)
cherrypy.log.access_log.addHandler(h)
# set up python logging