Skip to content

Commit

Permalink
调整 Logger 级别
Browse files Browse the repository at this point in the history
  • Loading branch information
pjialin committed Jul 9, 2019
1 parent 1e35f6e commit 2d194a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Web Api 接口支持

## TODO
- [ ] Docker Support
- [x] Docker Support
- [ ] TSDB Support
- [ ] More api Support

Expand Down
3 changes: 2 additions & 1 deletion src/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def load(cls):
# Logger
def set_up_logger():
logger = logging.getLogger(Config.APP_NAME)
logger.setLevel('DEBUG' if Config.APP_ENV == Config.AppEnvType.DEV else 'ERROR')

logger.setLevel(logging.DEBUG if Config.APP_ENV == Config.AppEnvType.DEV else logging.INFO)
handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
handler.setFormatter(formatter)
Expand Down

0 comments on commit 2d194a0

Please sign in to comment.