Skip to content

Commit

Permalink
Improve console logging for adhoc scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Oct 2, 2017
1 parent 6e2f8c3 commit d0865e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@
- Switch to [Crowdin](https://crowdin.com) to manage translations [#1171](https://github.com/opendatateam/udata/pull/1171)
- **BREAKING** Switch to `Flask-Security`. `Flask-Security-Fork` should be uninstalled before installing the new requirements [#958](https://github.com/opendatateam/udata/pull/958)
- Added a `udata info` command for diagnostic purpose [#1179](https://github.com/opendatateam/udata/pull/1179)
- Improve logging for adhoc scripts [#1184](https://github.com/opendatateam/udata/pull/1184)

## 1.1.8 (2017-09-28)

Expand Down
5 changes: 5 additions & 0 deletions udata/commands/__init__.py
Expand Up @@ -109,6 +109,11 @@ def set_logging(app):
app.logger.handlers = []
app.logger.addHandler(handler)

logger = logging.getLogger('__main__')
logger.setLevel(log_level)
logger.handlers = []
logger.addHandler(handler)

for name in app.config['PLUGINS']:
logger = logging.getLogger('udata_{0}'.format(name))
logger.setLevel(log_level)
Expand Down

0 comments on commit d0865e4

Please sign in to comment.