Skip to content

Commit

Permalink
wrf4g status logging fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fernanqv committed Jun 23, 2022
1 parent e5bff2b commit e37e5f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wrf4g/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

def run( arg ) :
try:
# El logger no funcionaba porque el import logging se hace varias veces y coge la primera. Hacemos un reload para que funcione
# https://stackoverflow.com/questions/20240464/python-logging-file-is-not-working-when-using-logging-basicconfig
from imp import reload
reload(logging)
logging.basicConfig( format = '%(message)s',
level = logging.DEBUG if arg[ '--dbg' ] else logging.INFO,
stream = sys.stdout )
Expand Down

0 comments on commit e37e5f1

Please sign in to comment.