analyze: merge {get,set}-log-{level,target} to log-{level,target} (#8020)
Also, service-watchdogs now shows current watchdog state when no optional argument is provided.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4c0d481095
commit
90657286fc
@@ -42,11 +42,11 @@ _systemd_analyze() {
|
||||
)
|
||||
|
||||
local -A VERBS=(
|
||||
[STANDALONE]='time blame plot dump get-log-level get-log-target calendar'
|
||||
[STANDALONE]='time blame plot dump calendar'
|
||||
[CRITICAL_CHAIN]='critical-chain'
|
||||
[DOT]='dot'
|
||||
[LOG_LEVEL]='set-log-level'
|
||||
[LOG_TARGET]='set-log-target'
|
||||
[LOG_LEVEL]='log-level'
|
||||
[LOG_TARGET]='log-target'
|
||||
[VERIFY]='verify'
|
||||
[SECCOMP_FILTER]='syscall-filter'
|
||||
[SERVICE_WATCHDOGS]='service-watchdogs'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#compdef systemd-analyze
|
||||
# SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
_systemd_analyze_set-log-level() {
|
||||
_systemd_analyze_log-level() {
|
||||
local -a _levels
|
||||
_levels=(debug info notice warning err crit alert emerg)
|
||||
_describe -t level 'logging level' _levels || compadd "$@"
|
||||
}
|
||||
|
||||
_systemd_analyze_set-log-target() {
|
||||
_systemd_analyze_log-target() {
|
||||
local -a _targets
|
||||
_targets=(console journal kmsg journal-or-kmsg null)
|
||||
_describe -t target 'logging target' _targets || compadd "$@"
|
||||
@@ -33,10 +33,8 @@ _systemd_analyze_command(){
|
||||
'plot:Output SVG graphic showing service initialization'
|
||||
'dot:Dump dependency graph (in dot(1) format)'
|
||||
'dump:Dump server status'
|
||||
'set-log-level:Set systemd log threshold'
|
||||
'set-log-target:Set systemd log target'
|
||||
'get-log-level:Get systemd log threshold'
|
||||
'get-log-target:Get systemd log target'
|
||||
'log-level:Get/set systemd log threshold'
|
||||
'log-target:Get/set systemd log target'
|
||||
'service-watchdogs:Get/set service watchdog status'
|
||||
'syscall-filter:List syscalls in seccomp filter'
|
||||
'verify:Check unit files for correctness'
|
||||
|
||||
Reference in New Issue
Block a user