Skip to content

Commit

Permalink
Merge pull request #38 from openclimatefix/issue/more-logging
Browse files Browse the repository at this point in the history
add more logging
  • Loading branch information
peterdudfield authored Jan 30, 2024
2 parents bb80d60 + 3676adc commit eb76c43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pvnet_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)

logging.basicConfig(
level=getattr(logging, os.getenv("LOGLEVEL", "INFO")),
format="[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s",
)

logger = logging.getLogger(__name__)
logger.setLevel(getattr(logging, os.getenv("LOGLEVEL", "INFO")))
logger.addHandler(stream_handler)

# Get rid of these verbose logs
Expand Down

0 comments on commit eb76c43

Please sign in to comment.