Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetLogs support for Timestamps #49

Open
antoinetran opened this issue Jan 28, 2025 · 1 comment
Open

GetLogs support for Timestamps #49

antoinetran opened this issue Jan 28, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@antoinetran
Copy link
Contributor

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.

@dciangot
Copy link
Collaborator

@antoinetran what about the slurm plugin converting the log to json on the fly? So without requiring additional packages.

antoinetran added a commit to antoinetran/interlink-slurm-plugin that referenced this issue Jan 29, 2025
interTwin-eu#49 -
GetLogs Timestamps option now throw a warning instead of error
@dciangot dciangot added the enhancement New feature or request label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants