Initial commit
This commit is contained in:
26
kaizenbot/__init__.py
Normal file
26
kaizenbot/__init__.py
Normal file
@ -0,0 +1,26 @@
|
||||
import logging
|
||||
|
||||
|
||||
logger = logging.getLogger('kaizen')
|
||||
# sets the logger output format
|
||||
formatter = logging.Formatter('[%(asctime)s] - %(levelname)s: %(message)s', '%Y-%m-%d %H:%M:%S')
|
||||
# creates the logger handlers
|
||||
|
||||
# configuring the logger
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
# console output
|
||||
console_handler = logging.StreamHandler()
|
||||
console_handler.setFormatter(formatter)
|
||||
logger.addHandler(console_handler)
|
||||
|
||||
# file output
|
||||
file_handler = logging.FileHandler('/var/log/kaizen.log')
|
||||
file_handler.setFormatter(formatter)
|
||||
logger.addHandler(file_handler)
|
||||
|
||||
|
||||
# --- #
|
||||
|
||||
# ADDED AFTERWARDS: yes a global variable, why use classes if this works too
|
||||
glob = {'bot': None, 'transcript': {}, 'timers': [], 'twitter': None}
|
Reference in New Issue
Block a user