[ENH]: Logging with a color formatter #412
No reviewers
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer!412
Loading…
Reference in a new issue
No description provided.
Delete branch "enh/color_format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Taking advantage of the xterm-colors... this PR adds colors to logging messages.
It also allows to set the datalad logger to a different level than the one from junifer, allowing to debug junifer without the million debugging messages from datalad.
Codecov Report
Attention: Patch coverage is
0%with70 linesin your changes missing coverage. Please review.Additional details and impacted files
100.00% <ø> (ø)0.00% <0.00%> (ø)Flags with carried forward coverage won't be shown. Click here to find out more.
0.00% <0.00%> (ø)0.00% <0.00%> (ø)0.00% <0.00%> (ø)0.00% <0.00%> (ø)@ -83,0 +109,4 @@def __init__(self, fmt: str, datefmt: Optional[str] = None) -> None:"""Initialize the ColorFormatter."""logging.Formatter.__init__(self, fmt, datefmt)Any preference for
range(...)over anIntEnum?What about an option for a
--colorparameter for switching between the formatters? Maybe some remote machine doesn't have xterm support and that might break it?@ -83,0 +109,4 @@def __init__(self, fmt: str, datefmt: Optional[str] = None) -> None:"""Initialize the ColorFormatter."""logging.Formatter.__init__(self, fmt, datefmt)just copilot being copilot
I will auto-detect color support
Yeah looks good.
Needs a newsfragment and it's good to go.