regulators: Add getMessages method
Add getMessages method. It gets the journal messages that have the
specified field set to the specified value.
Tested:
* Get field "_PID" with value "1".
* Get field "_SYSTEMD_UNIT" with value "init.scope".
* Get a field that does not exist and return vector size is 0.
* max parameter is 0 and return all messages.
* max parameter is less than number of messages in journal
and return max number of messages.
* max parameter is more than number of messages in journal
and return all messages
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I6a9410b5509b3044c1de103e71276e8e7c241fa6
diff --git a/phosphor-regulators/src/meson.build b/phosphor-regulators/src/meson.build
index ed22808..b20e0bd 100644
--- a/phosphor-regulators/src/meson.build
+++ b/phosphor-regulators/src/meson.build
@@ -13,6 +13,7 @@
'exception_utils.cpp',
'ffdc_file.cpp',
'id_map.cpp',
+ 'journal.cpp',
'pmbus_utils.cpp',
'rail.cpp',
'sensor_monitoring.cpp',