Skip to content

Commit 3a639ff

Browse files
committed
Enable logging in the Jupyter server instance.
1 parent 51c419e commit 3a639ff

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

build/jupyter_server_config.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
## Set the log level by value or name.
1919
# Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
2020
# Default: 30
21-
# c.Application.log_level = 30
21+
c.Application.log_level = 'INFO'
2222

2323
## Configure additional log handlers.
2424
#
@@ -65,7 +65,22 @@
6565
# },
6666
# }
6767
# Default: {}
68-
# c.Application.logging_config = {}
68+
c.Application.logging_config = {
69+
"handlers": {
70+
"file": {
71+
"class": "logging.FileHandler",
72+
"level": "INFO",
73+
"filename": "/raid/blelbach/dev/pyhpc-tutorial/build/jupyter_server.log",
74+
"formatter": "console"
75+
}
76+
},
77+
"loggers": {
78+
"ServerApp": {
79+
"level": "INFO",
80+
"handlers": ["console", "file"]
81+
}
82+
}
83+
}
6984

7085
## Instead of starting the Application, dump configuration to stdout
7186
# Default: False
@@ -1824,4 +1839,3 @@
18241839

18251840
# See also: BaseKernelWebsocketConnection.session
18261841
# c.ZMQChannelsWebsocketConnection.session = None
1827-

0 commit comments

Comments
 (0)