Skip to content

Commit

Permalink
Add doodba logger handler and formatter
Browse files Browse the repository at this point in the history
Fixes #161.
  • Loading branch information
yajo committed Aug 17, 2018
1 parent 58a8d00 commit d53ff6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/odoobaselib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@

# Customize logging for build
logger = logging.getLogger("doodba")
log_handler = logging.StreamHandler()
log_formatter = logging.Formatter("%(name)s %(levelname)s: %(message)s")
log_handler.setFormatter(log_formatter)
logger.addHandler(log_handler)
_log_level = os.environ.get("LOG_LEVEL", "")
if _log_level.isdigit():
_log_level = int(_log_level)
Expand Down

0 comments on commit d53ff6e

Please sign in to comment.