sensor-monitor/threshold_alarm_logger: Log sensor name
This patch introduces an optional feature to append the sensor name to
the error message description. This helps in identifying the specific
sensor that triggered the alarm, improving debugging and visibility.
Change-Id: I32942ab74ebdcf0675a35718a4140d221c3aa20a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
diff --git a/meson.build b/meson.build
index d2cc75d..5d8e3fd 100644
--- a/meson.build
+++ b/meson.build
@@ -157,6 +157,13 @@
get_option('sensor-monitor-soft-shutdown-delay'),
)
+log_sensor_name_on_error = get_option('log-sensor-name-on-error')
+if log_sensor_name_on_error
+ conf.set('LOG_SENSOR_NAME_ON_ERROR', '1')
+else
+ conf.set('LOG_SENSOR_NAME_ON_ERROR', '0')
+endif
+
# Presence
conf.set('NUM_PRESENCE_LOG_ENTRIES', get_option('num-presence-log-entries'))
conf.set_quoted('PRESENCE_YAML_FILE', get_option('presence-config'))