|
|
@ -10,11 +10,15 @@ from functools import wraps |
|
|
|
|
|
|
|
app = Flask(__name__) |
|
|
|
|
|
|
|
logfmt = 'time=%(asctime)s level=%(levelname)s app=%(name) msg=%(message)s' |
|
|
|
|
|
|
|
logrotate = RotatingFileHandler( |
|
|
|
'/var/log/login/server', |
|
|
|
backupCount=10, |
|
|
|
) |
|
|
|
|
|
|
|
logrotate.setFormatter(logfmt) |
|
|
|
|
|
|
|
logrotate.setLevel(logging.DEBUG) |
|
|
|
|
|
|
|
app.logger.addHandler(logrotate) |
|
|
|