Alpha release
This commit is contained in:
parent
62681acd16
commit
eeda5062ae
14 changed files with 842 additions and 1 deletions
27
app.py
Normal file
27
app.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import sys
|
||||
|
||||
from loguru import logger
|
||||
from Server.Host.flaskApp import app
|
||||
from Server.DB.querys import add
|
||||
|
||||
import configparser
|
||||
config = configparser.ConfigParser()
|
||||
config.sections()
|
||||
config.read('Options.ini')
|
||||
'''
|
||||
INFO if doing Asynchronous, Thread-safe, Multiprocess-safe
|
||||
All sinks added to the logger are thread-safe by default.
|
||||
They are not multiprocess-safe,
|
||||
but you can enqueue the messages to ensure logs
|
||||
integrity. This same argument can also be used if
|
||||
you want async logging.
|
||||
'''
|
||||
@logger.catch
|
||||
def run(): #TODO: sys.stderr back to a file log??
|
||||
logger.add(sys.stderr, format="{time} {level} {message}", filter="startup", level="INFO")
|
||||
logger.add(sys.stderr, backtrace=True, diagnose=config['OTHER']['log_diagnose'])
|
||||
app.run(debug=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
#First startup is handled in DB/handler
|
||||
run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue