mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
Addded some logging
This commit is contained in:
parent
3372179feb
commit
b959d720de
8
web.py
8
web.py
@ -5,6 +5,14 @@ from flask import Flask, request, session, flash, render_template, redirect, url
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = '?9huDM\\H'
|
app.secret_key = '?9huDM\\H'
|
||||||
|
|
||||||
|
import config
|
||||||
|
if config.get('LOG_FILE'):
|
||||||
|
import logging
|
||||||
|
from logging.handlers import TimedRotatingFileHandler
|
||||||
|
handler = TimedRotatingFileHandler(config.get('LOG_FILE'), when = 'midnight')
|
||||||
|
handler.setLevel(logging.WARNING)
|
||||||
|
app.logger.addHandler(handler)
|
||||||
|
|
||||||
import db
|
import db
|
||||||
from user_manager import UserManager
|
from user_manager import UserManager
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user