lg2: commit: add support for journal-only method
The design document for the new event system references an
option to log events to the journal rather than to dbus[1] using
the 'OPENBMC_MESSAGE_ID' identifier. Add support and test cases
for this as a meson option.
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md#phosphor-logging
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6cb94453c6cc95a9ccbbbc11859b70ef12d375fd
diff --git a/config/meson.build b/config/meson.build
index 661ded3..946ec39 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -4,6 +4,16 @@
conf_data.set('error_info_cap', get_option('error_info_cap'))
conf_data.set('rsyslog_server_conf', get_option('rsyslog_server_conf'))
+lg2_commit_strategy = get_option('lg2_commit_strategy')
+conf_data.set(
+ 'lg2_commit_dbus',
+ lg2_commit_strategy == 'dbus' or lg2_commit_strategy == 'both' ? 'true' : 'false',
+)
+conf_data.set(
+ 'lg2_commit_journal',
+ lg2_commit_strategy == 'journal' or lg2_commit_strategy == 'both' ? 'true' : 'false',
+)
+
cxx = meson.get_compiler('cpp')
if cxx.has_header('poll.h')
add_project_arguments('-DPLDM_HAS_POLL=1', language: 'cpp')
@@ -15,5 +25,5 @@
input: 'config.h.meson',
output: 'config.h',
configuration: conf_data,
- )
+ ),
)