Stop using SQLAlchemy ORM and add colorful logs
This commit is contained in:
parent
59998b99b1
commit
b59eab2953
8 changed files with 90 additions and 65 deletions
|
@ -72,18 +72,21 @@ api_features:
|
|||
logging:
|
||||
version: 1
|
||||
formatters:
|
||||
precise:
|
||||
colored:
|
||||
(): maubot.lib.color_log.ColorFormatter
|
||||
format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
|
||||
normal:
|
||||
format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
|
||||
handlers:
|
||||
file:
|
||||
class: logging.handlers.RotatingFileHandler
|
||||
formatter: precise
|
||||
filename: ./logs/maubot.log
|
||||
formatter: normal
|
||||
filename: ./maubot.log
|
||||
maxBytes: 10485760
|
||||
backupCount: 10
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: precise
|
||||
formatter: colored
|
||||
loggers:
|
||||
maubot:
|
||||
level: DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue