Try logging.

This commit is contained in:
Dominik Pantůček 2025-07-12 17:15:22 +02:00
parent 15dfd0be04
commit 3ab537f7d9
2 changed files with 14 additions and 0 deletions

View file

@ -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.