2022-11-15 06:30:33 +08:00
|
|
|
logger_version = '1.0.0'
|
2022-11-01 18:34:02 +08:00
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Loggers]
|
2022-11-01 18:34:02 +08:00
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Loggers.root]
|
|
|
|
level = 'DEBUG'
|
|
|
|
color = 'main_color'
|
|
|
|
file = 'main_log_file'
|
2022-11-03 20:37:30 +08:00
|
|
|
handlers = ['main_std_handler']
|
2022-11-01 18:34:02 +08:00
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Loggers.client]
|
|
|
|
level = 'TRACE'
|
|
|
|
color = 'main_color'
|
|
|
|
file = 'main_log_file'
|
2022-11-03 20:37:30 +08:00
|
|
|
handlers = ['main_std_handler']
|
2022-11-01 18:34:02 +08:00
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Loggers.server]
|
|
|
|
level = 'TRACE'
|
|
|
|
color = 'DiGua_color'
|
|
|
|
file = 'main_log_file'
|
2022-11-03 20:37:30 +08:00
|
|
|
handlers = ['main_std_handler']
|
2022-11-01 18:34:02 +08:00
|
|
|
|
|
|
|
[Files]
|
2022-11-01 23:22:39 +08:00
|
|
|
|
|
|
|
[Files.main_log_file]
|
2022-11-03 20:37:30 +08:00
|
|
|
name = './logs/{long_time}_logs.md'
|
2022-11-01 23:22:39 +08:00
|
|
|
level = 'TRACE'
|
|
|
|
cache_len = 20
|
|
|
|
cache_time = 1
|
|
|
|
mode = 'a'
|
|
|
|
encoding = 'utf-8'
|
|
|
|
|
2022-11-03 20:37:30 +08:00
|
|
|
[Handler]
|
|
|
|
|
|
|
|
[Handler.main_std_handler]
|
|
|
|
class = 'str handler'
|
|
|
|
format = 'format.main_format'
|
|
|
|
|
|
|
|
[Handler.main_file_hander]
|
|
|
|
class = 'cached file handler'
|
|
|
|
format = 'format.main_format'
|
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Formatter]
|
|
|
|
|
2022-12-25 23:15:49 +08:00
|
|
|
main_format = '[{long_time}] [{logger_name}] {level} | {file_name}:{code_line} | {marker} | {message}'
|
2022-11-01 23:22:39 +08:00
|
|
|
file_name = 'no frame'
|
|
|
|
code_line = 'no frame'
|
|
|
|
short_time = '%Y-%m-%d %H-%M-%S'
|
|
|
|
long_time = '%Y-%m-%d %H-%M-%S:%%S'
|
2022-11-01 18:34:02 +08:00
|
|
|
|
|
|
|
[Colors]
|
|
|
|
|
2022-11-01 23:22:39 +08:00
|
|
|
[Colors.main_color]
|
2022-12-29 10:13:26 +08:00
|
|
|
# 翻了三个月的颜色啊
|
|
|
|
long_time = '\u001b[38;2;201;222;56m'
|
|
|
|
short_time = '\u001b[38;2;201;222;56m'
|
2022-11-11 09:33:34 +08:00
|
|
|
code_line = '\u001b[38;2;0;255;180m'
|
|
|
|
file_name = '\u001b[38;2;0;255;180m'
|
|
|
|
info = '\u001b[0m'
|
|
|
|
message = '\u001b[0m'
|
|
|
|
logger = '\u001b[0m'
|
|
|
|
marker = '\u001b[0m'
|
2022-12-29 10:13:26 +08:00
|
|
|
# level colors
|
2022-11-15 06:30:33 +08:00
|
|
|
TRACE.info = '\u001b[38;2;138;173;244m'
|
|
|
|
FINE.info = '\u001b[35;48;2;44;44;54m'
|
|
|
|
DEBUG.info = '\u001b[38;2;133;138;149m'
|
|
|
|
INFO.info = '\u001b[0m'
|
|
|
|
WARNING.info = '\u001b[33m'
|
|
|
|
ERROR.info = '\u001b[31m'
|
|
|
|
FATAL.info = '\u001b[38;2;255;255;0;48;2;120;10;10m'
|
|
|
|
FATAL.logger = '\u001b[38;2;245;189;230m'
|
2022-11-27 13:45:59 +08:00
|
|
|
|
|
|
|
[Colors.fancy_main_color]
|
2022-12-29 10:13:26 +08:00
|
|
|
long_time = '\u001b[38;2;201;222;56m'
|
|
|
|
short_time = '\u001b[38;2;201;222;56m'
|
2022-11-27 13:45:59 +08:00
|
|
|
file_name = '\u001b[38;2;0;255;180m'
|
|
|
|
code_line = '\u001b[38;2;0;255;180m'
|
|
|
|
info = '\u001b[0m'
|
|
|
|
message = '\u001b[0m'
|
|
|
|
logger = '\u001b[0m'
|
|
|
|
marker = '\u001b[0m'
|
2022-12-29 10:13:26 +08:00
|
|
|
# level colors
|
|
|
|
TRACE.info = '\u001b[38;2;138;173;244m'
|
|
|
|
TRACE.message = '\u001b[38;2;138;173;244m'
|
|
|
|
FINE.info = '\u001b[35;48;2;44;44;54m'
|
|
|
|
FINE.message = '\u001b[35m'
|
|
|
|
DEBUG.info = '\u001b[38;2;133;138;149m'
|
|
|
|
DEBUG.message = '\u001b[38;2;133;138;149m'
|
|
|
|
INFO.info = '\u001b[0m'
|
|
|
|
INFO.message = '\u001b[0m'
|
|
|
|
WARNING.info = '\u001b[33m'
|
|
|
|
WARNING.message = '\u001b[33m'
|
|
|
|
ERROR.info = '\u001b[31m'
|
|
|
|
ERROR.message = '\u001b[31m'
|
|
|
|
FATAL.info = '\u001b[38;2;255;255;0;48;2;120;10;10m'
|
|
|
|
FATAL.message = '\u001b[38;2;255;255;0;48;2;120;10;10m'
|
|
|
|
FATAL.logger = '\u001b[38;2;245;189;230m'
|
|
|
|
|
|
|
|
[Colors.DiGua_color]
|
|
|
|
# catppuccin Macchiato
|
|
|
|
long_time = '\u001b[38;2;202;211;245m'
|
|
|
|
short_time = '\u001b[38;2;202;211;245m'
|
|
|
|
file_name = '\u001b[38;2;139;213;202m'
|
|
|
|
code_line = '\u001b[38;2;166;218;149m'
|
|
|
|
info = '\u001b[0m'
|
|
|
|
logger = '\u001b[0m'
|
|
|
|
message = '\u001b[0m'
|
|
|
|
marker = '\u001b[0m'
|
|
|
|
# level colors
|
|
|
|
TRACE.info = '\u001b[38;2;138;173;244m'
|
|
|
|
TRACE.message = '\u001b[38;2;138;173;244m'
|
|
|
|
FINE.info = '\u001b[38;2;198;160;246m'
|
|
|
|
FINE.message = '\u001b[38;2;198;160;246m'
|
|
|
|
DEBUG.info = '\u001b[38;2;133;138;149m'
|
|
|
|
DEBUG.message = '\u001b[38;2;133;138;149m'
|
|
|
|
ERROR.info = '\u001b[38;2;237;135;150m'
|
|
|
|
ERROR.message = '\u001b[38;2;237;135;150m'
|
|
|
|
WARNING.info = '\u001b[38;2;245;169;127m'
|
|
|
|
WARNING.message = '\u001b[38;2;245;169;127m'
|
|
|
|
FATAL.info = '\u001b[38;2;255;255;0;48;2;120;10;10m'
|
|
|
|
FATAL.message = '\u001b[38;2;255;255;0;48;2;120;10;10m'
|
|
|
|
FATAL.loggger = '\u001b[38;2;245;189;230m'
|
|
|
|
|