Skip to content

Run toolbox init-container with a higher or a adjustable log level #1795

Description

@clement-dufour

When a toolbox container is started e.g. on first use or after a host reboot, the container CMD instruction runs. This instruction is the toolbox init-container command. However, this command is always called with a log level of debug. This value looks hard coded (https://github.com/containers/toolbox/blob/main/src/cmd/create.go#L414). The log level used on toolbox creation with the --log-level flag has no effect.

This behavior bothers me because these logs are all registered as priority 3 (error) logs on the system journal as already discussed on another issue : #1381.

I would like this log level to be configurable or hard-coded to a higher level (such as error for example). It could follow the log level of the toolbox create invocation although this solution is not perfect.

I would be glad to provide more information on this or to submit a PR with a proposed solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions