mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 23:09:52 +08:00
feat: Handle '/dev/stdout' in Logger Configuration
This commit is contained in:
@@ -192,6 +192,7 @@ def configure_logger(app):
|
|||||||
app.logger.addHandler(handler)
|
app.logger.addHandler(handler)
|
||||||
|
|
||||||
log_file = app.config['LOG_PATH']
|
log_file = app.config['LOG_PATH']
|
||||||
|
if log_file and log_file != "/dev/stdout":
|
||||||
file_handler = RotatingFileHandler(log_file,
|
file_handler = RotatingFileHandler(log_file,
|
||||||
maxBytes=2 ** 30,
|
maxBytes=2 ** 30,
|
||||||
backupCount=7)
|
backupCount=7)
|
||||||
|
Reference in New Issue
Block a user