1
0
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:
Alban 2012-11-21 13:09:31 +01:00 committed by Alban
parent 3372179feb
commit b959d720de

8
web.py
View File

@ -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