Skip to content

Commit

Permalink
Ensure correct logging level when using CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobGM committed Feb 14, 2018
1 parent 5d641a4 commit c045b39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions astrality/astrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def main(logging_level: str = 'INFO', test: bool = False):
"""
if 'ASTRALITY_LOGGING_LEVEL' in os.environ:
# Override logging level if env variable is set
logger.setLevel(os.environ['ASTRALITY_LOGGING_LEVEL'])
else:
# Set the logging level to the level passed in by bin/astrality cli
logger.setLevel(logging_level)
logging_level = os.environ['ASTRALITY_LOGGING_LEVEL']

# Set the logging level to the configured setting
logging.basicConfig(level=logging_level)

# Quit old astrality instances
kill_old_astrality_processes()
Expand Down

0 comments on commit c045b39

Please sign in to comment.