Skip to content

Commit

Permalink
Logging Format Updates (#67)
Browse files Browse the repository at this point in the history
* add coloredlogs to requirements.txt

* add coloredlogs.install()
  • Loading branch information
ric-evans authored Feb 4, 2021
1 parent 57196e3 commit 5c11477
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions file_catalog/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os

import coloredlogs # type: ignore[import]
from file_catalog.server import Server
from file_catalog.config import Config
from pprint import pprint
Expand All @@ -20,8 +21,9 @@ def main():

config = Config()
config.update_from_env()

logging.basicConfig(level=('DEBUG' if config['DEBUG'] else 'INFO'))

coloredlogs.install(level=('DEBUG' if config['DEBUG'] else 'INFO'))

try:
Server(config,
port=config['FC_PORT'],
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Babel==2.7.0
certifi==2019.9.11
cffi==1.13.0
chardet==3.0.4
coloredlogs==14.0
coverage==4.5.4
cryptography==3.2
docutils==0.15.2
Expand Down

0 comments on commit 5c11477

Please # to comment.