Skip to content

Commit

Permalink
f: Move config log
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Jung committed Feb 5, 2021
1 parent b3846e7 commit 32c3f05
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rtpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def read_config(path):
logging.error('Could not read config file: {}'.format(args.config))
return None


def get_configs(includes):
if len(includes) > 0:
for include in includes:
Expand Down Expand Up @@ -105,14 +104,13 @@ def main():
get_configs(base_config['retemplate']['include'])
config = merge_configs(base_config)

logging.info('Retemplate loaded with this configuration:\n{}'.format(json.dumps(config, indent=2)))

# Update logging config based on user configs if Python allows it
if 'retemplate' in config and 'logging' in config['retemplate'] and sys.version_info.minor >= 8:
logcfg.update(config['retemplate']['logging'])
logging.basicConfig(**logcfg)
logging.debug('Logging configured')

logging.info('Retemplate loaded with this configuration:\n{}'.format(json.dumps(config, indent=2)))

# Configure DataStores
for store in config['stores']:
Expand Down

0 comments on commit 32c3f05

Please sign in to comment.