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

Add missing -l equivalent option for --log-level #14939

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/podman/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
pFlags.BoolVar(&dummyHelp, "help", false, "Help for podman")

logLevelFlagName := "log-level"
pFlags.StringVar(&logLevel, logLevelFlagName, logLevel, fmt.Sprintf("Log messages above specified level (%s)", strings.Join(common.LogLevels, ", ")))
pFlags.StringVarP(&logLevel, logLevelFlagName, "l", logLevel, fmt.Sprintf("Log messages above specified level (%s)", strings.Join(common.LogLevels, ", ")))
_ = rootCmd.RegisterFlagCompletionFunc(logLevelFlagName, common.AutocompleteLogLevel)

// Only create these flags for ABI connections
Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Identity value resolution precedence:
- `containers.conf`
Remote connections use local containers.conf for default.

#### **--log-level**=*level*
#### **--log-level**, "**-l**"=*level*

Log messages at and above specified level: debug, info, warn, error, fatal or panic (default: "warn")

Expand Down
4 changes: 2 additions & 2 deletions test/system/001-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ See 'podman version --help'" "podman version --remote"
is "$output" 'Log Level "telepathic" is not supported.*'
run_podman --log-level=trace info
run_podman --log-level=debug info
run_podman --log-level=info info
run_podman --l=info info
run_podman --log-level=warn info
run_podman --log-level=warning info
run_podman --log-level=error info
run_podman --l error info
run_podman --log-level=fatal info
run_podman --log-level=panic info
}
Expand Down