-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK新增滚动日志功能 #706
SDK新增滚动日志功能 #706
Conversation
ERROR_SET_CONFIG_HEADER = { | ||
'level': 'ERROR', | ||
'formatter': 'standard', | ||
'class': 'appbuilder.SizeAndTimeRotatingFileHandler', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个参数名改成和现有的一致。
LOGGING_CONFIG["handlers"]["file"]["filename"] = log_file | ||
ERROR_FILE_HEADER["filename"] = _add_error_to_file_name(log_file) | ||
FILE_HEADER["filename"] = log_file | ||
FILE_HEADER["level"] = loglevel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这几个loglevel,改成loglevel.upper()
python/utils/logger_file_headler.py
Outdated
self.base_filename = filename | ||
self.when = when.upper() | ||
self.interval = interval | ||
self.max_bytes = max_bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数名改成一致的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ae5d0d3
to
88fbb8f
Compare
88fbb8f
to
4868155
Compare
4868155
to
65756e8
Compare
65756e8
to
d41647d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
完成SDK新增滚动日志功能,依据如下参数滚动:
(1)依据时间滚动
(2)依据文件大小滚动
(3)限制存留文件数量
(4)依据总文件的大小滚动
新增能力:
(1)分离DEBUG级别日志和ERROR级别日志,ERROR日志会独立输出到error开头的文件,此更改同步覆盖到原有的环境变量、setFilename功能中
注意:
(1)文件大小级别日志后缀为与时间滚动相同的时间戳