Skip to content

Commit

Permalink
Minor fix (revert to getting the root handlers in reporterrors())
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Oct 25, 2024
1 parent d42111f commit 9811b99
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bidscoin/bcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ def synchronize(pbatch, jobids: list, wait: int=15):
def setup_logging(logfile: Path=Path()):
"""
Set up the logging framework:
1) Add custom logging levels: 'bcdebug', 'verbose', and 'success'.
2) Add a console stream handler for generating terminal output.
3) Optionally add file handlers for normal log and warning/error log if logfile is provided.
- Add a console stream handler for generating terminal output.
- Optionally add file handlers for normal log and warning/error log if logfile is provided.
:param logfile: Path to the logfile. If none, logging is console-only
"""
Expand Down Expand Up @@ -167,9 +166,9 @@ def reporterrors() -> str:
:return: The errorlog
"""

# Find the filehandlers and report the errors and warnings
# Find the root filehandlers and report the errors and warnings
errors = ''
for handler in LOGGER.handlers:
for handler in logging.getLogger().handlers:
if handler.name == 'errorhandler':

errorfile = Path(handler.baseFilename)
Expand Down

0 comments on commit 9811b99

Please sign in to comment.