Skip to content

Commit

Permalink
logging: capture ServerApp logs too
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed May 18, 2022
1 parent d1a3532 commit 9b24be3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cylc/uiserver/jupyter_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,29 @@
}
},
}
c.ServerApp.logging_config = {
'version': 1,
'handlers': {
'file': {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'INFO',
'filename': str(USER_CONF_ROOT / 'jupyter_server.log'),
'mode': 'a',
'backupCount': 5,
'maxBytes': 10485760,
'formatter': 'file_fmt',
},
},
'loggers': {
'ServerApp': {
'level': 'INFO',
'handlers': ['console', 'file'],
},
},
'formatters': {
'file_fmt': {
'format': '%(asctime)s %(levelname)-8s %(message)s',
'datefmt': '%Y-%m-%dT%H:%M:%S',
}
},
}

0 comments on commit 9b24be3

Please sign in to comment.