Skip to content

Commit

Permalink
Merge pull request #128 from openworm/development
Browse files Browse the repository at this point in the history
#111 Fix notebook logs
  • Loading branch information
filippomc authored May 25, 2022
2 parents 1ddaa59 + 6742c22 commit 4d94b72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jupyter_geppetto/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import sys

from ipykernel.jsonutil import json_clean
# from jupyter_client import session
Expand Down Expand Up @@ -47,9 +48,10 @@ def configure_logging():
# Configure log
logger = logging.getLogger()
fhandler = logging.FileHandler(filename='app.log', mode='a')
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s')
formatter = logging.Formatter('%(asctime)s|%(name)s|%(levelname)s - %(message)s')
fhandler.setFormatter(formatter)
logger.addHandler(fhandler)
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.DEBUG)
logging.debug('Log configured')
except Exception as exception:
Expand Down

0 comments on commit 4d94b72

Please sign in to comment.