mirror of
https://github.com/DarrylNixon/CrowdTLS-server.git
synced 2024-09-22 18:19:43 -07:00
35 lines
789 B
Python
35 lines
789 B
Python
from loguru import logger
|
||
|
||
|
||
logger.add(
|
||
"app.log",
|
||
format="<level><light-blue>{time:YYYY-MM-DD HH:mm:ss} | {message}</light-blue></level>",
|
||
level="INFO",
|
||
rotation="1 day",
|
||
retention="30 days",
|
||
)
|
||
|
||
logger.add(
|
||
"errors.log",
|
||
format="<level><yellow>ℹ️ {time:YYYY-MM-DD HH:mm:ss} | {message}</yellow></level>",
|
||
level="WARNING",
|
||
rotation="1 day",
|
||
retention="30 days",
|
||
)
|
||
|
||
logger.add(
|
||
"error.log",
|
||
format="<level><red>⛔️ {time:YYYY-MM-DD HH:mm:ss} | {message}</red></level>",
|
||
level="ERROR",
|
||
rotation="1 day",
|
||
retention="30 days",
|
||
)
|
||
|
||
|
||
logger.add(
|
||
"critical.log",
|
||
format="<level><magenta>🚨 {time:YYYY-MM-DD HH:mm:ss} | {message}</magenta></level>",
|
||
level="CRITICAL",
|
||
rotation="1 day",
|
||
retention="30 days",
|
||
)
|