Skip to content

Commit 4af4b44

Browse files
authored
🐛Comp. backend: missing timestamps in log file (#4771)
1 parent 1e4beb8 commit 4af4b44

File tree

1 file changed

+5
-3
lines changed
  • services/dask-sidecar/src/simcore_service_dask_sidecar/computational_sidecar

1 file changed

+5
-3
lines changed

services/dask-sidecar/src/simcore_service_dask_sidecar/computational_sidecar/docker_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,19 @@ async def _parse_container_docker_logs(
251251
async for log_line in cast(
252252
AsyncGenerator[str, None],
253253
container.log(
254-
stdout=True, stderr=True, follow=True, timestamp=True
254+
stdout=True, stderr=True, follow=True, timestamps=True
255255
),
256256
):
257+
log_msg_without_timestamp = log_line.split(" ", maxsplit=1)[1]
257258
logger.info(
258259
"[%s]: %s",
259260
f"{service_key}:{service_version} - {container.id}{container_name}",
260-
log_line,
261+
log_msg_without_timestamp,
261262
)
262263
await log_fp.write(log_line.encode("utf-8"))
264+
# NOTE: here we remove the timestamp, only needed for the file
263265
await _parse_and_publish_logs(
264-
log_line,
266+
log_msg_without_timestamp,
265267
task_publishers=task_publishers,
266268
)
267269

0 commit comments

Comments
 (0)