logging
This commit is contained in:
parent
4cdcf5effa
commit
ea94680dc3
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -1,4 +1,4 @@
|
||||||
import queue, sqlite3, time, atexit, sys, uuid, json, urllib.parse, logging
|
import queue, sqlite3, time, atexit, sys, uuid, json, urllib.parse, logging, datetime
|
||||||
from flask import Flask, render_template, request, make_response, session
|
from flask import Flask, render_template, request, make_response, session
|
||||||
from flask_socketio import SocketIO, join_room, leave_room
|
from flask_socketio import SocketIO, join_room, leave_room
|
||||||
from flask_session import Session
|
from flask_session import Session
|
||||||
|
@ -18,7 +18,7 @@ Session(app)
|
||||||
socketio = SocketIO(app)
|
socketio = SocketIO(app)
|
||||||
|
|
||||||
#logging_config
|
#logging_config
|
||||||
logging.basicConfig(filename='matekasse.log',filemode='w', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' ,encoding='utf-8', level=logging.INFO)
|
logging.basicConfig(filename=f"matekasse-{datetime.datetime.now()}.log",filemode='w', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' ,encoding='utf-8', level=logging.INFO)
|
||||||
db_log = logging.getLogger('db')
|
db_log = logging.getLogger('db')
|
||||||
website_log = logging.getLogger('website')
|
website_log = logging.getLogger('website')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue