Skip to content

Conversation

@adameska
Copy link

…to see previous logs when my pod crashed.

Timestamps can be shown now, and selecting text will now copy it to the clipboard like i would expect (so i can google errors).

BEFORE:
image

AFTER:
image

Viewing Previous Logs to see why it crashed:
image

…s and support text copying.

Signed-off-by: David Hettinger <[email protected]>

Signed-off-by: Hettinger, David <[email protected]>
@adameska adameska force-pushed the AllowGettingPreviousLogs branch from 27a4bc3 to 97f0afd Compare October 30, 2025 18:52
@feloy feloy self-requested a review October 31, 2025 09:05
@feloy
Copy link
Contributor

feloy commented Oct 31, 2025

Thanks @adameska for this contribution, which is very valuable.

To help the team review, test and discuss it, it would be preferable to split this PR into a few ones, to add independent enhancements separately.

I can see these independent enhancements:

  • logs of previous container vs current one (we will need to consider the case when the pod runs several containers: do we get previous for all containers, do we select a specific container, etc)
  • stream vs retrieve
  • tail / since
  • timestamps
  • font size (related to make sizes configurable #270, we prefer to first consider using the preference from Podman Desktop core)
  • colorized logs
  • copy text in the clipboard (your change copies the selection in the clipboard as soon as the text is selected, which seems to me a non-standard way vs using Ctrl-c)

@adameska
Copy link
Author

adameska commented Nov 3, 2025

Thanks @adameska for this contribution, which is very valuable.

To help the team review, test and discuss it, it would be preferable to split this PR into a few ones, to add independent enhancements separately.

I can see these independent enhancements:

  • logs of previous container vs current one (we will need to consider the case when the pod runs several containers: do we get previous for all containers, do we select a specific container, etc)
  • stream vs retrieve
  • tail / since
  • timestamps
  • font size (related to make sizes configurable #270, we prefer to first consider using the preference from Podman Desktop core)
  • colorized logs
  • copy text in the clipboard (your change copies the selection in the clipboard as soon as the text is selected, which seems to me a non-standard way vs using Ctrl-c)

Thanks for the response! I can split this out into 3 separate PRs since i think splitting out all the options separately would be a bit of a merge nightmare unless done in many steps...

  1. Allow specifying logging options to view previous/subset of logs. I want to keep the font size override option there but agreed that if it could default to whatever the user settings is that would be nice. I'm not very familiar with the codebase but can take a look to see.
  2. Colorize logging with known formats for easier line parsing.
  3. Copying text. I went with the X-Term default since that's the control used but agree that also felt odd to me. I can allow but ctrl+c and right click (and on right click un-highlight the text so you know it did someting) to make it more similarly match terminal behavior i'm used to.

I will keep this PR open as the 1st option of adding the options object.

- Added scroll functionality to view previous logs
- Updated terminal color handling
- Improved pod logs component

Signed-off-by: adameska <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants