History log of /openbmc/phosphor-logging/log_manager.cpp (Results 1 – 25 of 98)
Revision Date Author Comments
# 109b4a5c 20-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

entry: remove AdditionalData2

The 'AdditionalData2' property was a temporary addition to ease the
transition from an array to a dictionary for the additional data.
All users have been migrated to us

entry: remove AdditionalData2

The 'AdditionalData2' property was a temporary addition to ease the
transition from an array to a dictionary for the additional data.
All users have been migrated to use the dictionary style and from the
'AdditionalData' property, so the '2' property can be removed.

Tested: Loaded an existing log database and observed dbus objects
are created successfully and with the 'AdditionalData2' field missing.
Created a new event with `log-create` CLI and observed new entry is
created successfully in dbus.

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

show more ...


# 25291157 01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Iac96affe709a51dd865117d006cb033cf5c624b1
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...


# b6d3e2fc 18-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

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

show more ...


# ea6d9c45 11-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

entry: switch AdditionalData to dict

Clients have been switched to use AddtionalData2, which is a
dictionary. Move AdditionalData also to a dictionary so we
can stage a removal of AdditionalData2.

entry: switch AdditionalData to dict

Clients have been switched to use AddtionalData2, which is a
dictionary. Move AdditionalData also to a dictionary so we
can stage a removal of AdditionalData2.

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

show more ...


# e5940634 22-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

extension: use map in create extension

Adjust the Create extension to use a map for metadata instead of
vector.

Tested: Unit tests updated and passing.

Signed-off-by: Patrick Williams <patrick@stw

extension: use map in create extension

Adjust the Create extension to use a map for metadata instead of
vector.

Tested: Unit tests updated and passing.

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

show more ...


# 64a9eaa3 22-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

log_manager: directly create metadata from journal

Eliminate one call to `additional_data::parse` by having the journal
metadata search use a `map` for the metadata instead of a `vector`.

Tested: T

log_manager: directly create metadata from journal

Eliminate one call to `additional_data::parse` by having the journal
metadata search use a `map` for the metadata instead of a `vector`.

Tested: Test cases pass.

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

show more ...


# 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 ...


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

refactor metadata pack/unpack functions

Move the `parse` and `combine` functions, which are used to translate
between `map<string,string>` and `vector<string>` for the metadata.
This is in preparati

refactor metadata pack/unpack functions

Move the `parse` and `combine` functions, which are used to translate
between `map<string,string>` and `vector<string>` for the metadata.
This is in preparation for transitioning the AdditionalData field
from `vector` to `map`.

Tested: Test cases pass. Simple `log-create` call has no change in
behavior.

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

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 ...


# 597f24af 27-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

Logging.Create: return result path from create call

Support new object path return from Logging.Create.

See Ia010e53fda55cef8b9cfc948482e133f20040320.

```
$ busctl --user call xyz.openbmc_project.

Logging.Create: return result path from create call

Support new object path return from Logging.Create.

See Ia010e53fda55cef8b9cfc948482e133f20040320.

```
$ busctl --user call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Logging.Create Create "ssa{ss}" "Example Event" xyz.openbmc_project.Logging.Entry.Level.Error 0
o "/xyz/openbmc_project/logging/entry/1"
$ busctl --user introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 -l
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Association.Definitions interface - - -
.Associations property a(sss) 0 emits-change writable
xyz.openbmc_project.Common.FilePath interface - - -
.Path property s "/tmp/phosphor-logging/errors/1" emits-change writable
xyz.openbmc_project.Logging.Entry interface - - -
.GetEntry method - h -
.AdditionalData property as 0 emits-change writable
.EventId property s "" emits-change writable
.Id property u 1 emits-change writable
.Message property s "Example Event" 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.Error" emits-change writable
.Timestamp property t 1727728256156 emits-change writable
.UpdateTimestamp property t 1727728256156 emits-change writable
xyz.openbmc_project.Object.Delete interface - - -
.Delete method - - -
xyz.openbmc_project.Software.Version interface - - -
.Purpose property s "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" emits-change writable
.Version property s "2.15" emits-change writable
```

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

show more ...


# fa2d962b 30-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

log-manager: enable non-standard path for local tests

Enable the log-manager to be launched with a path other than
`/var/phosphor-logging` to allow it to be ran on a development system
for test purp

log-manager: enable non-standard path for local tests

Enable the log-manager to be launched with a path other than
`/var/phosphor-logging` to allow it to be ran on a development system
for test purposes. This required some refactoring throughout as to
how paths were handled.

Tested:

After running tests, `/tmp/phosphor-logging` is populated with
entries. Launching `./builddir/phosphor-log-manager
/tmp/phosphor-logging`, the log-manager will have the entries on
dbus:

```
$ busctl --user tree xyz.openbmc_project.Logging
└─ /xyz
└─ /xyz/openbmc_project
└─ /xyz/openbmc_project/logging
├─ /xyz/openbmc_project/logging/entry
│ ├─ /xyz/openbmc_project/logging/entry/100
│ ├─ /xyz/openbmc_project/logging/entry/101
│ ├─ /xyz/openbmc_project/logging/entry/102
│ ├─ /xyz/openbmc_project/logging/entry/103
```

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

show more ...


# d763db35 03-Sep-2024 harsh-agarwal1 <harsh.agarwal@ibm.com>

PEL: Prevent deletion if it's associated with HWIsolation

- This ensures that PELs linked to HWIsolation records are protected
from accidental deletion.
- Shows error message of "Call failed: The se

PEL: Prevent deletion if it's associated with HWIsolation

- This ensures that PELs linked to HWIsolation records are protected
from accidental deletion.
- Shows error message of "Call failed: The service is temporarily
unavailable.", when attempting to delete such a PEL individually.
- If trying to Delete all, will skip such PELs without showing any
message.

Tested:
Sample output:
```bash
$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging xyz.openbmc_project.Collection.DeleteAll DeleteAll

$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging/entry/2 xyz.openbmc_project.Object.Delete Delete
Call failed: The service is temporarily unavailable.

```
Change-Id: I2d28de91bbb0fbc2a991e3d5e5631814d41fe044
Signed-off-by: Harsh Agarwal <Harsh.Agarwal@ibm.com>

show more ...


# 075c7923 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: I21d2ca8065f24fd73509229c517f5caf48934b60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 221b79b3 04-Mar-2024 Paul Fertser <fercerpav@gmail.com>

log_manager: remove redundant createWithFFDC

Fold the functionality of creating an event entry with FFDC appended
into a common implementation to avoid code duplication and to ease
further extension

log_manager: remove redundant createWithFFDC

Fold the functionality of creating an event entry with FFDC appended
into a common implementation to avoid code duplication and to ease
further extension and maintainability.

Build-tested with 'openpower-pel-extension' enabled.

Change-Id: I0f8151b782bf42cc7bc0981e58f6ab1e3cda080c
Signed-off-by: Paul Fertser <fercerpav@gmail.com>

show more ...


# 6ddbf69e 05-Sep-2023 Willy Tu <wltu@google.com>

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1
Signed-off-b

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 7ba17c34 12-Jun-2023 Matt Spinler <spinler@us.ibm.com>

Don't throw on Settings access fail

The isQuiesceOnErrorEnabled() function makes a call to the Settings
daemon. If that throws an exception, the code just re-throws the
exception. While that excep

Don't throw on Settings access fail

The isQuiesceOnErrorEnabled() function makes a call to the Settings
daemon. If that throws an exception, the code just re-throws the
exception. While that exception is caught by sdbusplus, it causes the
function to exit early and not actually save the event log in the class.

To fix this, just change the code to say quiesceOnError isn't enabled
and continue on.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I814e6dae90483c98e0f24af90baa5f267d22b78d

show more ...


# ac1ba3f2 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: I077deb6e98025e4e8c6abd4d039f9af4db19342b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 271d143d 18-Jan-2023 Matt Spinler <spinler@us.ibm.com>

Move journal sync function to util.cpp

Move it out of log_manager.cpp so other code will be able to call it.

The code itself wasn't changed, though a comment was modified, as it is
now a utility fu

Move journal sync function to util.cpp

Move it out of log_manager.cpp so other code will be able to call it.

The code itself wasn't changed, though a comment was modified, as it is
now a utility function it may no longer just be called when an error log
is created.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I33a20c1a68059fd50678464776e88168ce93d030

show more ...


# 2544b419 04-Oct-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

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


# 4a375950 01-Jul-2022 Matt Spinler <spinler@us.ibm.com>

Fix some cppcheck warnings

Fix some of the warnings in the base phosphor-logging code.

It doesn't fix all of them - some are false positives and some are just
suggestions, but it does bring down th

Fix some cppcheck warnings

Fix some of the warnings in the base phosphor-logging code.

It doesn't fix all of them - some are false positives and some are just
suggestions, but it does bring down the number a bit to make it easier
to spot real issues.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8a131cbc2941ccba79ef3775151007c770207bd5

show more ...


# 45e83521 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# 01bf5c4b 23-May-2022 Lei YU <yulei.sh@bytedance.com>

Remove errorIds

The errorIds is used to record the IDs during restore(), and to find the
max element after the restore().
The `entries` is the sorted map so it already has this information.
Remove i

Remove errorIds

The errorIds is used to record the IDs during restore(), and to find the
max element after the restore().
The `entries` is the sorted map so it already has this information.
Remove it and use `entries` directly instead.

Tested: Verify the entryId is assigned correctly in restore().

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I744e92949193aa7d72d2bb035f1b72fe140fb646

show more ...


# 86a60e91 15-Apr-2022 Andrew Geissler <geissonator@yahoo.com>

host-graceful-quiesce: call new target

This new target was introduced as a part of this updated design:
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/52874

This allows the host firmware the

host-graceful-quiesce: call new target

This new target was introduced as a part of this updated design:
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/52874

This allows the host firmware the opportunity to gracefully shutdown
when phosphor-logging detects it needs to Quiesce the host.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I6832fc947f4e0ce93717d2bbcfcb45cf3ebc6c38

show more ...


# 601b8113 26-Jan-2022 Matt Spinler <spinler@us.ibm.com>

Don't block boot on debug or info level event logs

Event logs with a severity of Debug or Informational do not need to
block boots, when that functionality is enabled, even if they contain a
callout

Don't block boot on debug or info level event logs

Event logs with a severity of Debug or Informational do not need to
block boots, when that functionality is enabled, even if they contain a
callout. If a boot block was desired, the creating application can just
make the error a different severity.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I79f052a8159342ed6d9ccd11e057482bd2272114

show more ...


# fb978da4 21-Jan-2022 Matt Spinler <spinler@us.ibm.com>

Pull file path into elog Entry constructor

The path property on the FilePath interfaces was previously being set
after the entry object was created, sending a properties changed signal
after the int

Pull file path into elog Entry constructor

The path property on the FilePath interfaces was previously being set
after the entry object was created, sending a properties changed signal
after the interfaces added signal.

Since the path can be known at the time the entry is constructed, pass
it into the constructor instead so no extra signal will be sent.

Change-Id: I1150236d23cecb1df78e3fb4ae641c75b488af37

show more ...


1234