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(a)redhat.com>
---
kdump-logger.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kdump-logger.sh b/kdump-logger.sh
index cf4d81041520..c81e614e907e 100755
--- a/kdump-logger.sh
+++ b/kdump-logger.sh
@@ -172,7 +172,10 @@ _dlvl2syslvl() {
*) return 1;;
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
--
2.17.1