Skip to content

Commit

Permalink
[FIX] Handle string and integer logging levels in cprint (aramis-la…
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen authored Sep 4, 2024
1 parent 440bf4a commit 7edad3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clinica/utils/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ def cprint(msg: str, lvl: Optional[Union[str, int, LoggingLevel]] = None) -> Non
from logging import getLogger

lvl = lvl or LoggingLevel.INFO
# Use the package level logger.
lvl = get_logging_level(lvl)
logger = getLogger("clinica")

# Log message as info level.
if lvl == LoggingLevel.DEBUG:
logger.debug(msg=msg)
elif lvl == LoggingLevel.INFO:
Expand Down

0 comments on commit 7edad3c

Please sign in to comment.