Skip to content

Commit

Permalink
Implements the functionality to customize the logging based on config…
Browse files Browse the repository at this point in the history
… file (amundsen-io#95)

* Adds the option to have logging using configuration file

* Bumps the version of metadata since we need this for monitoring

* Disables the existing loggers in case of config file
  • Loading branch information
verdan authored and feng-tao committed Dec 20, 2019
1 parent d3ac482 commit b7c8ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadata_service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create_app(*, config_module_class: str) -> Flask:
app.config.from_object(config_module_class)

if app.config.get('LOG_CONFIG_FILE'):
logging.config.fileConfig(app.config.get('LOG_CONFIG_FILE'))
logging.config.fileConfig(app.config.get('LOG_CONFIG_FILE'), disable_existing_loggers=False)
else:
logging.basicConfig(format=app.config.get('LOG_FORMAT'), datefmt=app.config.get('LOG_DATE_FORMAT'))
logging.getLogger().setLevel(app.config.get('LOG_LEVEL'))
Expand Down

0 comments on commit b7c8ead

Please sign in to comment.