Open argaar opened 1 day ago
Looking through logs I can see a different log format between the one used by tornado.log in culler script (https://github.com/jupyterhub/jupyterhub-idle-culler/blob/main/jupyterhub_idle_culler/__init__.py#L252) and the log outputted by the hub. The different log format is causing problem to log parser (FluentD), and the log never shows up in my log collector
Just let a notebook in idle state and wait for the culler to kill it
The behaviour is ok, the idle notebook gets killed
https://github.com/jupyterhub/jupyterhub-idle-culler/pull/83 switches to uses Traitlets, which I think means we could use self.log to use Traitlets logging instead of the current tornado logging.
self.log
Bug description
Looking through logs I can see a different log format between the one used by tornado.log in culler script (https://github.com/jupyterhub/jupyterhub-idle-culler/blob/main/jupyterhub_idle_culler/__init__.py#L252) and the log outputted by the hub. The different log format is causing problem to log parser (FluentD), and the log never shows up in my log collector
How to reproduce
Just let a notebook in idle state and wait for the culler to kill it
Expected behaviour
The behaviour is ok, the idle notebook gets killed
Actual behaviour
The behaviour is ok, the idle notebook gets killed
Logs
[I 2024-11-26 09:15:06.745 JupyterHub log:192] 200 POST /hub/api/users/davide.foschi/activity (davide.foschi@10.20.30.40) 13.59ms [I 2024-11-26 09:20:36.000 JupyterHub log:192] 200 POST /hub/api/users/davide.foschi/activity (davide.foschi@10.20.30.40) 12.37ms [I 2024-11-26 09:25:23.301 JupyterHub log:192] 200 POST /hub/api/users/davide.foschi/activity (davide.foschi@10.20.30.40) 12.05ms [I 2024-11-26 09:30:01.723 JupyterHub log:192] 200 POST /hub/api/users/davide.foschi/activity (davide.foschi@10.20.30.40) 11.48ms **[I 241126 09:34:44 __init__:236]** Culling server davide.foschi (inactive for 01:01:25) [I 2024-11-26 09:34:44.849 JupyterHub proxy:357] Removing user davide.foschi from proxy (/user/davide.foschi/) [I 2024-11-26 09:34:44.852 JupyterHub spawner:2849] Deleting pod desp-userwkfl/jupyter-davide-2efoschi [I 2024-11-26 09:34:48.667 JupyterHub base:1285] User davide.foschi server took 3.819 seconds to stop [I 2024-11-26 09:34:48.668 JupyterHub log:192] 204 DELETE /hub/api/users/davide.foschi/server (jupyterhub-idle-culler@::1) 3825.99ms [I 2024-11-26 10:48:18.749 JupyterHub log:192] 200 GET /hub/home (davide.foschi@10.20.30.40) 10.84ms [I 2024-11-26 10:48:23.558 JupyterHub log:192] 200 GET /hub/token (davide.foschi@10.20.30.40) 18.64ms