[feat] add logger

This commit is contained in:
SouthFox 2023-07-27 15:16:15 +08:00
parent ccaa753f79
commit 38b2e7f917

8
app.py
View file

@ -1,12 +1,20 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Creatr App""" """Creatr App"""
import sys
from flask import Flask, Response, request, Request, abort, jsonify from flask import Flask, Response, request, Request, abort, jsonify
from loguru import logger
from demo.utils.checker import inbox_prechecker from demo.utils.checker import inbox_prechecker
from demo.activitypub import ME from demo.activitypub import ME
from demo import config from demo import config
logger.remove()
logger.add(sys.stdout, level="DEBUG")
logger.add("output.log", level="DEBUG")
app = Flask(__name__, app = Flask(__name__,
static_folder="demo/static",) static_folder="demo/static",)