Skip to content

GetLogs support for Timestamps #49

@antoinetran

Description

@antoinetran

Issue:
Currently, to get logs with Timestamps options will make a failure: unsupported option req.Opts.Timestamps and no logs are generated.

Expected:
Doing kubectl logs [pod] --since ... will result in logs honoring the since option.

Cause:
To be implemented!!

Proposition of fix:
Docker logs to a JSON file containing

{"log":"\r\n","stream":"stdout","time":"2025-01-27T18:00:11.914339229Z"}
{"log":"\u001b[?2004hbash-5.2# \r\n","stream":"stdout","time":"2025-01-27T18:00:11.978278586Z"}
{"log":"\u001b[?2004l\r\u001b[?2004hbash-5.2# echo ok\r\n","stream":"stdout","time":"2025-01-27T18:00:14.310362866Z"}
{"log":"\u001b[?2004l\rok\r\n","stream":"stdout","time":"2025-01-27T18:00:14.310851485Z"}

InterLink Slurm Plugin should do the same, in order to not lose the timestamp information.
Currently, the stdout and stderr of a container is written to [container_name].out. Instead, it should be written to [container_name]-log.json

However, currently only bash is expected as prerequisite. This feature might requires python3 and json module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions