History log of /openbmc/phosphor-logging/lib/lg2_commit.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# ea21d995 22-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

entry: use map for metadata in ctor

Transition the entry constructor to use the `map<string,string>`
rather than the `vector<string>`.

Tested: UTs pass and daemon still creates logs.

Signed-off-by

entry: use map for metadata in ctor

Transition the entry constructor to use the `map<string,string>`
rather than the `vector<string>`.

Tested: UTs pass and daemon still creates logs.

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

show more ...


# dd9694ae 21-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

lg2: commit: avoid double quoting strings

The JSON `.dump()` function will quote a string, if that is what the
JSON type was. This results in AdditionalData fields which appear
double-quoted. Fix

lg2: commit: avoid double quoting strings

The JSON `.dump()` function will quote a string, if that is what the
JSON type was. This results in AdditionalData fields which appear
double-quoted. Fix this by checking the type and using the raw value
for strings.

Before:
```
.AdditionalData property as 8 "READING_VALUE=98.6" "SENSOR_NAME=\"Inlet Temperature\"" "THRESHOLD_VALUE=40.0" "UNITS=\"xyz.openbmc_project.Sensor.Value.Unit.DegreesC\"" "_CODE_FILE=../log_create_main.cpp" "_CODE_FUNC=int generate_event(const std::string&, const nlohmann::json_abi_v3_11_2::json&)" "_CODE_LINE=34" "_PID=1931265" emits-change writable
```

After:
```
.AdditionalData property as 8 "READING_VALUE=98.6" "SENSOR_NAME=Inlet Temperature" "THRESHOLD_VALUE=40.0" "UNITS=xyz.openbmc_project.Sensor.Value.Unit.DegreesC" "_CODE_FILE=../log_create_main.cpp" "_CODE_FUNC=int generate_event(const std::string&, const nlohmann::json_abi_v3_11_2::json&)" "_CODE_LINE=34" "_PID=2219391" emits-change writable
```

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

show more ...


# fc14867b 06-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

lg2: commit: simplify commit functions

Eliminate the template indirection for the commit function in favor
of a base-class overload. There was previously a public template
specialization of `lg2::c

lg2: commit: simplify commit functions

Eliminate the template indirection for the commit function in favor
of a base-class overload. There was previously a public template
specialization of `lg2::commit` and a private base-class implementation
(in the `details` namespace). The template implementations provided
no stronger type-checking, since it was already a concept requiring
inheritance from the base-class. The template precluded simple code
such as:

```cpp
try
{
//...
}
catch (const sdbusplus::exception::generated_event_base& e)
{
lg2::commit(e);
}
```

By making the base-class types public, rather than hidden in the
details namespace, and removing the templates, the code is simpler
and more usable.

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

show more ...


# 6eb96bf7 05-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

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'

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

show more ...


# 9ca4d137 31-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

manager: use new Logging.Cleared event

Modify the internal manager support for creating internal events
to be able to support the sdbusplus generated events. Transition
from the local Logging.Error

manager: use new Logging.Cleared event

Modify the internal manager support for creating internal events
to be able to support the sdbusplus generated events. Transition
from the local Logging.Error.LogsCleared to the global Logging.Cleared
event. Clean up references to the old event.

Tested:
```
$ busctl --user call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Collection.DeleteAll DeleteAll
$ busctl --user introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 -l | cat
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
xyz.openbmc_project.Logging.Entry interface - - -
.GetEntry method - h -
.AdditionalData property as 5 "NUMBER_OF_LOGS=210" "_CODE_FILE=../log_manager.hpp" "_CODE_FUNC=virtual void phosphor::logging::Manager::deleteAll()" "_CODE_LINE=361" "_PID=3318436" emits-change writable
.EventId property s "" emits-change writable
.Id property u 1 emits-change writable
.Message property s "xyz.openbmc_project.Logging.Cleared" emits-change writable
.Resolution property s "" emits-change writable
.Resolved property b false emits-change writable
.ServiceProviderNotify property s "xyz.openbmc_project.Logging.Entry.Notify.NotSupported" emits-change writable
.Severity property s "xyz.openbmc_project.Logging.Entry.Level.Informational" emits-change writable
.Timestamp property t 1730408674348 emits-change writable
.UpdateTimestamp property t 1730408674348 emits-change writable
```

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

show more ...


# 247fed60 31-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

lg2: commit: extract source location information and add to event

sdbusplus will add PID and std::source_location information, from
the event origination point, to the event. Extract this and add
i

lg2: commit: extract source location information and add to event

sdbusplus will add PID and std::source_location information, from
the event origination point, to the event. Extract this and add
it to the event.

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

show more ...


# f0af358f 10-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

lg2: commit: add methods for new sdbusplus events

Add implementations and test cases for the `lg2::commit` functions.

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

lg2: commit: add methods for new sdbusplus events

Add implementations and test cases for the `lg2::commit` functions.

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

show more ...


# e001cd79 07-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

lg2: commit: add stubs to support new sdbusplus events

Create empty stubs for the commit functions from the new event
log design[1].

[1]: https://github.com/openbmc/docs/blob/master/designs/event-l

lg2: commit: add stubs to support new sdbusplus events

Create empty stubs for the commit functions from the new event
log design[1].

[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md

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

show more ...