| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Now these files are copied to a folder under phosphor-logging,
other repositories will need to be fixed. I'm leaving the files in
the base dir as well until I work on fixing all projects that
utilizes log.hpp and elog.hpp
Change-Id: Ie4640852727c1572325e974548737bc70a6db7c2
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The metadata.yaml file is the correct location for the inherits.
Update the elog-gen.py parser to support this change.
Change-Id: Iac7f67ec72e761ab3dafbf89c7e4d5495b34f00d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I4a96fe626c32e0c8078f8875da48eb06d63e763b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
| |
Temporary support for the HostEvent data that is checked in
instead of auto-generated.
Change-Id: I34e0c8d91dd51b26efaadbe0cd8be951f0e4bc01
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Implement the Commit client interface to take the
exception unique name and call the dbus Commit interface
to create the error log.
Change-Id: Id780e98efd32b9806ea24e4e551f786a055cc05c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The commit function would be too big to hold on the
header file. Move it to a library and update the
phosphos-logging.pc file for users to link against it.
Add dependency to libsdbusplus as the commit interface
would make use of the transaction id support.
Change-Id: I237b15e35a633f1da9bf3401b5bf754154f132db
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Export a manually generated header file that contains the error
information to log a host event error. This is temporary
the openpower-dbus-interfaces repo exports the yaml files and
the phosphor-logging repo parses the exception header files.
The header file also contains the info generated by the lookup
template.
Change-Id: Iea02ffd809e3815f34bb4a1b5c89639d2207dd43
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Populate the Entry Timestamp property which is
described as the time when the error log entry
is committed in milliseconds since 1970.
Change-Id: Id47fb974cf8220975eef0cc226581d0603a798a9
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Create an Entry dbus object when Commit is called and fill in
its properties with the journal data.
Change-Id: I155cacbdfdccfa8b1f594503d858710fa71f2026
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Provide a pkg-config for clients using our headers.
Partially resolves openbmc/openbmc#1106
Change-Id: I185da26a0034b4bb315d2b279c776eea87c14a82
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Link to libphosphor_dbus.so so that the Entry
code is auto-generated.
Change-Id: I845d083456a1094a49f773b3ec64240d4515b3ac
Signed-off-by: Adriana Kobylak <anoo@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Alias metadata inherited from parent errors such that users don't have
to explicitly know which parent provides the metadata :
using metaName = ParentError::metaName
Change-Id: Idd285766b9f831d19391f46cee1ed2ff320b2c30
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete unused elog-lookup-template.mako.cpp file and update the
one in the tools directory.
Example of generated code for reference:
std::map<std::string,level> g_errLevelMap = {
{"TestErrorOne",level::INFO},
{"TestErrorTwo",level::ERR},
};
Change-Id: I5dcf47cb4827f80aa7a04bbe2beb181e28d7dafc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Persist the log manager dbus bus and create a
vector of Entry instances to store the Entry
dbus objects as they get created.
Change-Id: I4add43c4ce6795b6ec6c041e41cd7455d34b3b6b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The design direction changed after the commit that added the
log_manager main function, so updating it to the correct usage.
Change-Id: I88459fb65ba6b8272f0f9f85b55f9f837487ffea
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Implement the generated code to create an error/event
entry dbus object.
Change-Id: I881636fe3e8de680d9a15fff1fe933d5e22eed06
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add the lookup mako target to the makefile to get it built.
Use the lookup map to find the metadata that needs to be
added to the error log. Use the transaction id to filter
for the desired journal entries.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Change-Id: Ia57dc83aab4f7ee35f8de32a799c862be28113f7
|
|
|
|
|
|
|
|
|
| |
For each journal entry, add the transaction id for the process
that called the log interface. This will be used to identify all
the journal entries associated with a dbus message.
Change-Id: Id934253bd77a517315e6cdba01a8ac819ad95b52
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
| |
Ensure inherited metadata shows up in the journal.
Change-Id: I4b6c30e1439bf6a799fbb78d8e8eb6754141b568
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
If an error inherits another error (via the error YAML interface), have
the child error inherit parent's metadata. Only single inheritance is
supported as of now.
Change-Id: I9ff295f4db04a9c5389f66e04f5d28287f9628a9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The elog-gen.py script should process errors such that the generated
code has definitions for parent errors before their child errors are
defined.
Change-Id: I035292731346bdba969f549c7e4033066814890f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Check if errors that are being inherited from have their interfaces
defined. Throw an error if not.
Change-Id: I13c6b844ef46eef7fead7a5f8ae1d8b56d914ecf
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Openbmc error interfaces can inherit other error interfaces, thereby
allowing to combine metadata across errors. The current implementation
would support single inheritance only.
This first commit related to error inheritance implementation lets
elog-gen.py figure out an error's parent.
Change-Id: Ia5c44de755e777e0cb2725afa5988c97283d10f0
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change enables the elog-gen script to look at more than one error
yaml file (and corresponding metadata yaml file). The input to the
script had to be changed to a yaml directory, containing
error yaml files, instead of a single error yaml file.
The reason to support reading multiple error yaml files is that,
without this, applications have to all dump their errors in a single big
error yaml file. Now it's possible to write application/domain specific
error yaml files; they just need to be exported to the same location,
from where elog-gen.py can pick them.
Change-Id: I9418bf0e0b54a7b7f7701b337649cb8eb4c54913
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: If5e2e534740f0675ba9294905ae531e015aed85a
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
This change is just for brevity.
Change-Id: Ie2360b19179837a1dc3675e96a4adcc2114f2bc6
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I2c2eb03e2c52a1cbfce654348ebd6a6157625396
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I414c2842840b0d623966f92b3a79d3223b52b299
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I9431b7d3df37fe92adaa9acb5172c8cfcdb38e4e
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Id2ad6a75b6ee3f7226c7cfd274dba24de89f9363
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Machine parseable DBus specification for the logging features.
The Manager interface implements the Commit method to
write entries to flash.
Change-Id: Id1e9e2475427a7358acfbe829733977709de05bc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I346fb1b482ac75828013ffb7ad58d3b000fa8542
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This is the final piece to supporting the phosphor-dbus-interfaces
design where the errors are defined in one yaml file and
their corresponding meta data is defined within another file.
Change-Id: Idd2e18c1fd82fccb1298a2570a484deb382954f8
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This is another step in the direction of getting us
to support the error yaml file as it will be
defined in the phosphor-dbus-interfaces repo.
Change-Id: Ib437bea920f511bdbf541c3e2653bbf35a83fe92
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The real yaml will be defined in the phosphor-dbus-interfaces
repo. This one will be an example one and used for testing.
Future commits will refactor it to separate the error def
from the meta data.
Change-Id: Id05f935cbc24fb030e2ba378423ef3261bf5f7fb
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Patrick's commit for exceptions had a few tweaks to the yaml
file format. This commit updates elog_gen.py to support them.
Change-Id: I59261ab0fddefde67304cbb394c74b9c9c5e496f
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This is being done to prep for exporting the tools and
templates to be used by other repos
Change-Id: Ia93166ade2a0361eca86cde123875b95a44a1ef3
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generated file from this mako file will be used
by the logging server to figure out which meta data
is associated with input error codes.
Future commits will work this into our build process
to generate the file.
Change-Id: Iadfdf1cbb51e4eae132facc25d4de43262359476
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This work is in prep for running this python script against the
errors defined in the phosphor-dbus-interfaces repo
Change-Id: I85e6f612a5935391deaedc74aab06ca023c15703
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Create error/event log based on message id (process id)
and metadata values.
Change-Id: Iaf944130c4075ae2d2c192e5ef840451561791bc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The mako python library requires full paths to the
template files so use ${abs_srdir} to get full paths
Change-Id: If322c66eedc7584633b18b137ad732be212359d6
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
| |
Error/event log dbus object with a placeholder method.
Change-Id: Icfa3f0dcddb3f47a62d8480a936bd8baa4b49760
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I93ad7c62aa53e3c670b8c0b1b98b1b58436a38d5
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take the elog.yaml file and generate the required hpp
file required for build time validation and error log
processing.
A future commit will delete elog-gen.hpp and will
start dynamically generating it during build.
Change-Id: I21a87d959096a2541de69fde47f57f02482a00cc
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit puts basic exception support into the elog class.
All errors will generate an exception with this commit.
This will most likely change over to using the dbus exception
class as a base in the future but that change will be transperent
to the users.
Change-Id: Ibd02d4c204393a0cfb156805360161759cb6631e
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Framework to create an error log entry based on information
from the journal log.
1. elog.yaml - User defined reason codes for error scenarios that
include description, priority level, and desired metadata fields.
2. elog_parser.py - Parser for the yaml file
3. elog-gen.hpp - Auto-generated file based created by the parser
that includes the error log structures. Including for now for ref.
4. elog.hpp - Error log template to create (log a journal log
entry with the predefined error log information).
Usage: elog<RC>(NAME(value), prev_entry<NAME>()...)
where RC - Reason code, NAME - metadata name
being logged to a journal entry, prev_entry - A Metadata entry that
has previously being logged to a journal entry.
Example:
log<level::DEBUG>(
msg("Info trace to log filename"),
entry(file_not_found::file_name::str, my_filename));
elog<file_not_found>(file_not_found::errnum(2),
file_not_found::file_path("/tmp/"),
prev_entry<file_not_found::file_name>());
Change-Id: Ic51cee80b58e341c071c366c5e2146fd6694012c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++ template to log a message to journald.
Usage:
log<level::XX>(const char*, entry(*format), entry()...);
log<level::XX>(char*, entry(*format), entry()...);
Example:
log<level::DEBUG>(
msg("Simple Example"));
char *msg_str[] = "File not found";
log<level::DEBUG>(
msg_str,
entry("MY_METADATA=%s_%x, name, number));
An std::string can be passed via: example_string.c_str()),
and entry("EXAMPLE_STRING=%s", example_string.c_str())).
A future enhancement would be for 'entry' tuples to be
individually validated with a similar approach as the gcc
attribute format.
Change-Id: I82f4450468cc0676458a0ce56cf33c934a1a66ef
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|