blob: ddbf8d7f84ec9b9955058e9adf5fc1796b2cdfc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
registry=$1
msgarg=$2
if [ -z "$registry" ]; then
echo "Usage:"
echo " $0 <redfish registry> <argument>"
exit
fi
# Check if logger exist. Do nothing if not exists
if ! logger --help | grep journald
then
echo "logger does not support the journald option. Skip log events for $registry $msgarg"
exit
fi
# Log events
logger --journald << EOF
MESSAGE=
PRIORITY=
SEVERITY=
REDFISH_MESSAGE_ID=$registry
REDFISH_MESSAGE_ARGS=$msgarg
EOF
|