Skip to content

Commit

Permalink
remove notes about logger issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Dec 6, 2023
1 parent e0a2206 commit 095e2e1
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/test_unit/test_cellfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,7 @@ def test_add_signal_and_background_files(
message : _type_
_description_
"""
# set logger to capture
# TODO: --- why root? :( "workflows.utils")
# logging.getLogger("workflows.utils")
# By default, the root log level is WARN,
# so every log with lower level (for example INFO or DEBUG) will be ignored
# I need to create the logger here because if it doesnt exist,
# it creates one from root
# whose default level is WARN, and so DEBUG and INFO levels are ignored
# (By default, a new logger has the NOTSET level, and as the root logger
# has a WARN level, the logger’s effective level will be WARN.)
# One option is to set the root logger level here to DEBUG -- then its
# "children" will have DEBUG level too
# caplog.set_level(logging.DEBUG, logger="workflows.utils") #"root")
# A better option is to create our logger here before anything else
# instantiate our custom logger
logger = setup_logger()
assert logger.name == "workflows.utils"

Expand Down

0 comments on commit 095e2e1

Please sign in to comment.