-
Notifications
You must be signed in to change notification settings - Fork 243
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
make logging.logger's behavior consistent with MMLogger #1092
Conversation
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
The previous log
The current log
|
logger 的名字目前不是很统一,有的是指定名字, |
不要用 |
@@ -33,7 +33,7 @@ | |||
|
|||
from .configuration_baichuan import BaiChuanConfig | |||
|
|||
logger = get_logger(__name__) | |||
logger = get_logger('lmdeploy') |
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.
can we set the default value of name to 'lmdeploy'
instead of None
for convenience in here?
Line 10 in fa07c5e
name: Optional[str] = None, |
Motivation
This PR #1064 replace MMLogger with logging.Logger, but there are two differences.
MMLogger has FilterDuplicateWarning
MMLogger doesn't propagate
https://github.com/open-mmlab/mmengine/blob/main/mmengine/logging/logger.py#L292-L306
https://github.com/python/cpython/blob/main/Lib/logging/__init__.py#L1707-L1735