forked from brmlab/brmbar-github
Try logging.
This commit is contained in:
parent
15dfd0be04
commit
3ab537f7d9
2 changed files with 14 additions and 0 deletions
|
@ -11,6 +11,17 @@ import brmbar
|
|||
|
||||
import argparse
|
||||
|
||||
import logging
|
||||
|
||||
root = logging.getLogger()
|
||||
root.setLevel(logging.DEBUG)
|
||||
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler.setLevel(logging.DEBUG)
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
handler.setFormatter(formatter)
|
||||
root.addHandler(handler)
|
||||
|
||||
# User credit balance limit; sale will fail when balance is below this limit.
|
||||
LIMIT_BALANCE = -200
|
||||
# When below this credit balance, an alert hook script (see below) is run.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue