Appropriately converts logger numeric level to syslog log level
The kdump-logger will be used by the system service(daemons), so let's appropriately convert the logger numeric level to syslog level with the facility(daemon). The number is constructed by multiplying the facility by 8 and then adding the level. About The Syslog Protocol, please refer to the RFC5424 for more details. Signed-off-by: Lianbo Jiang <lijiang@redhat.com> Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
parent
5b2b7ec08b
commit
239d64f6da
|
@ -172,7 +172,10 @@ _dlvl2syslvl() {
|
||||||
*) return 1;;
|
*) return 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -s /proc/vmcore ] && echo $((24+$lvl)) || echo $((8+$lvl))
|
# The number is constructed by multiplying the facility by 8 and then
|
||||||
|
# adding the level.
|
||||||
|
# About The Syslog Protocol, please refer to the RFC5424 for more details.
|
||||||
|
echo $((24+$lvl))
|
||||||
}
|
}
|
||||||
|
|
||||||
## @brief Prints to stderr, to syslog and/or /dev/kmsg given message with
|
## @brief Prints to stderr, to syslog and/or /dev/kmsg given message with
|
||||||
|
|
Loading…
Reference in New Issue