Skip to content

Commit

Permalink
Merge pull request #2321 from opentensor/feat/roman/logging-default-w…
Browse files Browse the repository at this point in the history
…arning

Set `WARNING` level ad default logging level
  • Loading branch information
roman-opentensor authored Sep 25, 2024
2 parents c469460 + 7b92071 commit 93729a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bittensor/utils/btlogging/loggingmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def after_transition(self, event, state):
def before_enable_default(self):
"""Logs status before enable Default."""
self._logger.info(f"Enabling default logging.")
self._logger.setLevel(stdlogging.INFO)
self._logger.setLevel(stdlogging.WARNING)
for logger in all_loggers():
if logger.name in self._primary_loggers:
continue
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_state_transitions(logging_machine, mock_config):
logging_machine.enable_default()
assert logging_machine.current_state_value == "Default"
# main logger set to INFO
mocked_bt_logger.setLevel.assert_called_with(stdlogging.INFO)
mocked_bt_logger.setLevel.assert_called_with(stdlogging.WARNING)
# 3rd party loggers should be disabled by setting to CRITICAL
mocked_third_party_logger.setLevel.assert_called_with(stdlogging.CRITICAL)

Expand Down

0 comments on commit 93729a4

Please sign in to comment.