Skip to content

Commit

Permalink
Sync changes for config from common-files
Browse files Browse the repository at this point in the history
  • Loading branch information
cj-wong committed Mar 26, 2021
1 parent 1d026a3 commit ce2c841
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,26 @@
import yaml


LOGGER = logging.getLogger('calendar-to-sheets')
_LOGGER_NAME = 'caltab'

LOGGER = logging.getLogger(_LOGGER_NAME)
LOGGER.setLevel(logging.DEBUG)

FH = logging.handlers.RotatingFileHandler(
'calendar-to-sheets.log',
maxBytes=4096,
_FH = logging.handlers.RotatingFileHandler(
f'{_LOGGER_NAME}.log',
maxBytes=40960,
backupCount=5,
)
FH.setLevel(logging.DEBUG)
_FH.setLevel(logging.DEBUG)

CH = logging.StreamHandler()
CH.setLevel(logging.INFO)
_CH = logging.StreamHandler()
_CH.setLevel(logging.WARNING)

FORMATTER = logging.Formatter(
_FORMATTER = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
FH.setFormatter(FORMATTER)
CH.setFormatter(FORMATTER)

LOGGER.addHandler(FH)
LOGGER.addHandler(CH)
_FH.setFormatter(_FORMATTER)
_CH.setFormatter(_FORMATTER)

YESTERDAY = pendulum.yesterday()
TODAY = pendulum.today()
Expand Down

0 comments on commit ce2c841

Please sign in to comment.