Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend debug mode message #90

Merged
merged 3 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
This now will be handled through `requirements.txt`.
([#68](https://github.com/MadAnalysis/madanalysis5/pull/68))

* Debug mode message has been extended to include module, function and file names
with line number. ([#90](https://github.com/MadAnalysis/madanalysis5/pull/90))

## Bug fixes
* Zero division error fixed in the simplified likelihoods workflow.
([#4](https://github.com/MadAnalysis/madanalysis5/pull/4))
Expand Down
3 changes: 2 additions & 1 deletion tools/ReportGenerator/Services/colored_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def format(self,record):
elif ( record.levelno >= 20 ): #INFO
color = '\x1b[0mMA5: '
elif ( record.levelno >= 10 ): #DEBUG
color = '\x1b[36mMA5-DEBUG: '
color = f"\x1b[36mMA5-DEBUG ({record.module}.{record.funcName}() " \
f"in {record.filename}::L{record.lineno}): "
else: #ANYTHING ELSE
color = '\x1b[0mMA5: '
record.msg = color + str( record.msg ) + '\x1b[0m'
Expand Down