Browse Source

fix adding rotating handler to app logger

master
Edoardo Putti 7 years ago
parent
commit
60bcd69b22
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      server.py

+ 3
- 3
server.py View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import lilikusers
import logging
from logging.handlers import RotatingFileHandler
import json
from flask import Flask, jsonify
from flask import request, Response, redirect, url_for
@ -9,12 +9,12 @@ from functools import wraps
app = Flask(__name__)
logrotate = logging.handlers.RotatingFileHandlers(
logrotate = RotatingFileHandler(
'/var/log/login/server',
backupCount=10,
)
app.logger.add_handler(logrotate)
app.logger.addHandler(logrotate)
lilik_ldap = lilikusers.LILiK_LDAP()


Loading…
Cancel
Save