tree: 4abb3456a3a3776ad8cb9c5a7034d5a8b80e8f92 [path history] [tgz]
  1. Create.interface.yaml
  2. Entry.interface.yaml
  3. Event.interface.yaml
  4. IPMI.interface.yaml
  5. README.md
  6. Settings.interface.yaml
xyz/openbmc_project/Logging/README.md

OpenBMC logging

  • Provides a mechanism for logging events and errors to the journal.
  • Creates error entry D-Bus objects when an error is reported/committed.
  • Persists error entries across power off.

Error definitions

Generic error definitions

  • Generic errors used by applications are defined at phosphor-dbus-interfaces
  • Generic errors can be used by all the applications by including the generated elog-errors.hpp header file.

Application error definitions

  • There are errors that are not generic and are very specific to the application. Such errors are defined in the application that uses the error.
  • Refer to openpower-debug-collector

Error YAML files

  • Every error defined will have an error YAML file and a corresponding error metadata YAML file.
  • The error YAML file contains the error name and a one-line description of the error. An example of an error YAML file can be found here.
  • The error metadata YAML file captures required data. The format of the data is defined in the error metadata file. An example of an error metadata YAML file can be found here

Logging to journal

  • Applications can log debug/error information to the journal using the log API
  • Applications can commit errors to the journal using the report or commit API
    • Refer to elog.hpp
    • Logging entry D-Bus objects are created for the committed errors.

Delete All interface

REST commands

Logging in

  • Before you can do anything, you need to first login.
$export bmc=xx.xx.xx.xx
$curl -c cjar -b cjar -k -X POST -H "Content-Type: application/json" -d '{"data": [ "root", "<root password>" ] }' https://{$bmc}/login

List logging child objects recursively

$curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/logging/list

List logging attributes of child objects recursively

$curl -c cjar -b cjar -s -k -H 'Content-Type: application/json'; -d '{"data" : []}' -X GET https://${bmc}/xyz/openbmc_project/logging/enumerate

Delete logging entries

$curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data": []}' https://${bmc}/xyz/openbmc_project/logging/entry/<entry num>/action/Delete

Delete all logging entries

$curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST https://${bmc}/xyz/openbmc_project/logging/action/DeleteAll -d "{\"data\": [] }"