blob: 1170c6a7cad4abac31198bd0c3566949dc9ac054 [file] [log] [blame]
Thang Q. Nguyen90bb5e12021-12-30 11:06:27 +00001#!/bin/bash
2
3registry=$1
4msgarg=$2
5
6if [ -z "$registry" ]; then
7 echo "Usage:"
8 echo " $0 <redfish registry> <argument>"
9 exit
10fi
11
12# Check if logger-systemd exist. Do nothing if not exists
13if ! command -v logger-systemd;
14then
15 echo "logger-systemd does not exist. Skip log events for $registry $msgarg"
16 exit
17fi
18
19# Log events
20logger-systemd --journald << EOF
21MESSAGE=
22PRIORITY=
23SEVERITY=
24REDFISH_MESSAGE_ID=$registry
25REDFISH_MESSAGE_ARGS=$msgarg
26EOF