Browse Source

add logrotate handler to server

master
Edoardo Putti 7 years ago
parent
commit
8d9d527d9f
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      server.py

+ 9
- 0
server.py View File

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


Loading…
Cancel
Save