Skip to content

Commit

Permalink
Introduce provenance logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominika Zemanovicova committed Feb 10, 2024
1 parent ad932dc commit 6ae5813
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bidscoin/bcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ def verbose(self, message, *args, **kws):
if self.isEnabledFor(logging.VERBOSE): self._log(logging.VERBOSE, message, args, **kws)
logging.Logger.verbose = verbose

logging.PROVENANCE = 16
logging.addLevelName(logging.PROVENANCE, 'PROVENANCE')
def provenance(self, message, *args, **kws):
if self.isEnabledFor(logging.PROVENANCE):
self._log(logging.PROVENANCE, message, args, **kws)
logging.Logger.provenance = provenance

# Add a success logging level = 25
logging.SUCCESS = 25
logging.addLevelName(logging.SUCCESS, 'SUCCESS')
Expand Down

0 comments on commit 6ae5813

Please sign in to comment.