Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOCHENYE committed Aug 30, 2023
1 parent d26cd56 commit 8f74cfb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mmengine/logging/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,19 @@ class MMLogger(Logger, ManagerMixin):
false.
file_handler_cfg (dict, optional): Dict to configure file handler.
Defaults to None. If ``file_handler_cfg`` is not specified,
``logging.FileHandler`` will be used by default. If it is specified,
the ``type`` key should be set. It can be 'RotatingFileHandler',
'TimedRotatingFileHandler', 'WatchedFileHandler' or other file
handler. And the remaining key pairs are passed in the constructor
of the handler.
``logging.FileHandler`` will be used by default. If it is
specified, the ``type`` key should be set. It can be
``RotatingFileHandler``, ``TimedRotatingFileHandler``,
``WatchedFileHandler`` or other file handlers, and the remaining
fields will be used to build the handler.
Examples:
>>> file_handler_cfg = dict(
>>> type='TimedRotatingFileHandler',
>>> when='MIDNIGHT',
>>> interval=1,
>>> backupCount=365)
`New in version 0.8.5.`
"""

Expand Down Expand Up @@ -247,7 +247,6 @@ def __init__(self,
file_handlers_map = _get_logging_file_handlers()
if file_handler_type in file_handlers_map:
file_handler_cls = file_handlers_map[file_handler_type]
file_handler_cfg.setdefault('mode', file_mode)
file_handler_cfg.setdefault('filename', log_file)
file_handler = file_handler_cls(**file_handler_cfg)
else:
Expand Down Expand Up @@ -431,6 +430,7 @@ def _get_host_info() -> str:
finally:
return host


def _get_logging_file_handlers() -> Dict:
"""Get additional file_handlers in ``logging.handlers``.
Expand Down

0 comments on commit 8f74cfb

Please sign in to comment.