feat: Handle '/dev/stdout' in Logger Configuration

This commit is contained in:
gmailnovo 2023-12-07 11:27:45 +08:00 committed by GitHub
parent a4f65e7fc6
commit d3c87ee500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -192,6 +192,7 @@ def configure_logger(app):
app.logger.addHandler(handler)
log_file = app.config['LOG_PATH']
if log_file and log_file != "/dev/stdout":
file_handler = RotatingFileHandler(log_file,
maxBytes=2 ** 30,
backupCount=7)