Browse Source

web/lib/utils.py: use WatchedFileHandler

Let admins safely rotate the logfiles with logrotate(8).
pull/1/head
Hidden Z 14 years ago
parent
commit
e1be09b22f
  1. 2
      web/lib/utils.py

2
web/lib/utils.py

@ -16,7 +16,7 @@ def get_logger(filename=None, log_level='debug'): @@ -16,7 +16,7 @@ def get_logger(filename=None, log_level='debug'):
logger = logging.getLogger(__name__)
logger.setLevel(level)
if filename:
handler = logging.FileHandler(filename)
handler = logging.WatchedFileHandler(filename)
else:
handler = logging.StreamHandler()
handler.setFormatter(formatter)

Loading…
Cancel
Save