Skip to content

[Enhancement]: Don't call getLogs() twice in Container#tryStart #11926

Closed

Description

@AB-xdev

Module

Core

Proposal

Code:

// Log output if startup failed, either due to a container failure or exception (including timeout)
final String containerLogs = getLogs();
if (containerLogs.length() > 0) {
logger().error("Log output from the failed container:\n{}", getLogs());

Should probably call getLogs() only once as it is not expected to change in between calls

Activity

  1. eddumelendez commented on Jul 17, 2026

    @eddumelendez
    Member

    Please, do not create an issue and PR at the same time.

  2. AB-xdev commented on Jul 17, 2026

    @AB-xdev
    ContributorAuthor

    Thank you for having a look at this and getting the PR merged :)

    Please, do not create an issue and PR at the same time.

    Could you please elaborate why or where this is documented?

    I also created the PR after the issue because the fix was a simple one-liner.

    PS: I'm usually always creating issues for PR if they don't exist because repository maintainers sometimes ignore pull requests due to an overwhelming amount of automated PR, e.g dependabot dependency updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions