Merge branch 'master' of 192.168.0.2:photoassistant
This commit is contained in:
15
logs.py
Normal file
15
logs.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import logging
|
||||||
|
from settings import Settings
|
||||||
|
|
||||||
|
class ImportLog():
|
||||||
|
def __init__(self):
|
||||||
|
logging_level = Settings.query.filter(Settings.name=="log_level").all()[0].value
|
||||||
|
logging_level = eval("logging." + logging_level)
|
||||||
|
logging.basicConfig(filename='logs/import.log', encoding='utf-8', level=logging_level)
|
||||||
|
|
||||||
|
class AppLog():
|
||||||
|
def __init__(self):
|
||||||
|
logging_level = Settings.query.filter(Settings.name=="log_level").all()[0].value
|
||||||
|
logging_level = eval("logging." + logging_level)
|
||||||
|
logging.basicConfig(filename='logs/app.log', encoding='utf-8', level=logging_level)
|
||||||
|
|
||||||
Reference in New Issue
Block a user