History log of /openbmc/phosphor-power/phosphor-regulators/src/journal.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# f5402197 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I7b90380845efee6bf6a1fe342a793d71aa9ff181
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 48781aef 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: If66f68c96df4baf8dc07abf8729a3cb7657e932d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 7f6921e5 28-Feb-2023 George Liu <liuxiwei@inspur.com>

phosphor-regulators: journal: Fix some warnings by cppcheck

Warning message:
phosphor-regulators/src/journal.cpp:46:5: style: Class
'JournalCloser' has a constructor with 1 argument that is not
expl

phosphor-regulators: journal: Fix some warnings by cppcheck

Warning message:
phosphor-regulators/src/journal.cpp:46:5: style: Class
'JournalCloser' has a constructor with 1 argument that is not
explicit. [noExplicitConstructor]
JournalCloser(sd_journal* journal) : journal{journal}
^

Tested: Verify that there are no such warnings in local CI.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I051ffc4905b64ef579b1eb58eac351967a5c6af1

show more ...


# 0c9a33d6 13-Sep-2021 Adriana Kobylak <anoo@us.ibm.com>

clang updates

The openbmc CI was recently updated to clang-12 which requires some
formatting updates to the code:
https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be048242690

clang updates

The openbmc CI was recently updated to clang-12 which requires some
formatting updates to the code:
https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be0482426908bb5497fad08

Make those updates and refresh the clang-format file with the one from
docs:
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Change-Id: Ieb3626526373a053ec84431e7560003f229f338d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# a528a281 15-Feb-2021 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Enhance SystemdJournal::getMessages()

Enhance the SystemdJournal::getMessages() method that obtains systemd
journal entries with a specified field value:
* Handle journal entries that do

regulators: Enhance SystemdJournal::getMessages()

Enhance the SystemdJournal::getMessages() method that obtains systemd
journal entries with a specified field value:
* Handle journal entries that do not have expected fields. All journal
fields are optional, so if a field is missing this is not an error
condition.
* Use built-in filtering support provided by the systemd journal API.
This will likely provide better performance.
* Use C++ std::string methods to perform field data parsing.
* Add short sleep before acquiring journal messages. Otherwise recently
added messages are sometimes not available.

Tested:
* Tested where journal entry is missing expected fields.
* Tested that built-in filtering support results in the desired set of
journal entries.
* Tested field data parsing. Tested where value has expected format and
when it does not.
* Verified all journal entries, including the most recently added ones,
are obtained.
* Tested error handling when each sd_journal_*() function fails.
* For complete test plan, see
https://gist.github.com/smccarney/bd4e546a76ee05e4df939eb69e23daee

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I066492edc05691b240d768c5b99cfa6f07d83ddf

show more ...


# ca08a790 30-Sep-2020 Bob King <Bob_King@wistron.com>

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

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

show more ...


# 9af85556 09-Apr-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Add logDebug() to journal interface

Enhance the journal interface to support logging messages with a
priority value of 'DEBUG'.

DEBUG messages are not normally stored by the systemd jou

regulators: Add logDebug() to journal interface

Enhance the journal interface to support logging messages with a
priority value of 'DEBUG'.

DEBUG messages are not normally stored by the systemd journal. However,
the systemd journal configuration can be modified to store and display
them when debugging a problem.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I93e43db79714a5b68fee2dd824d21b42f1aa6a45

show more ...


# 7c5d7b27 03-Apr-2020 Shawn McCarney <shawnmm@us.ibm.com>

regulators: Create journal interface

Create a light-weight interface for logging messages to the systemd
journal.

The standard interface implementation calls the phosphor-logging
functions to creat

regulators: Create journal interface

Create a light-weight interface for logging messages to the systemd
journal.

The standard interface implementation calls the phosphor-logging
functions to create real journal entries. This is the implementation
that the phosphor-regulators application links with.

The mock interface implementation stores the journal messages in static
vectors and provides functions to access them. This is the
implementation that testcases link with.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I5421794f7402f999b65c8367db5dd5ba07110f4a

show more ...