summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved log.hpp and elog.hpp to a folder under phosphor-loggingSaqib Khan2017-02-209-10/+18
| | | | | | | | | | 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>
* Move inherits keyword from errors.yaml to metadata.yamlAdriana Kobylak2017-02-207-13/+13
| | | | | | | | 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>
* elog-gen.py: python3 fixesPatrick Williams2017-02-201-7/+7
| | | | | Change-Id: I4a96fe626c32e0c8078f8875da48eb06d63e763b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Add HostEvent support to Commit interfaceAdriana Kobylak2017-02-161-0/+22
| | | | | | | | 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 Commit client interfaceAdriana Kobylak2017-02-162-4/+47
| | | | | | | | | 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>
* Create libphosphor-logging libraryAdriana Kobylak2017-02-164-11/+29
| | | | | | | | | | | 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 new header file for Host Event errorsAdriana Kobylak2017-02-152-1/+61
| | | | | | | | | | | | | 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 Timestamp when error entry is committedAdriana Kobylak2017-02-152-2/+12
| | | | | | | | | 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>
* Entry: Populate propertiesAdriana Kobylak2017-02-144-9/+45
| | | | | | | | 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>
* build: Add pkg-config for clientsBrad Bishop2017-02-133-6/+24
| | | | | | | | | 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>
* Entry: Link to phosphor-dbus-interfacesAdriana Kobylak2017-02-094-549/+10
| | | | | | | | 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>
* elog-gen.py : alias inherited metadataDeepak Kodihalli2017-02-091-3/+7
| | | | | | | | | | 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>
* Create a map to get the priority level for the errorAdriana Kobylak2017-01-302-25/+8
| | | | | | | | | | | | | | 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>
* Entry: Setup constructorAdriana Kobylak2017-01-303-13/+17
| | | | | | | | | 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>
* log_manager: Cleanup main functionAdriana Kobylak2017-01-304-68/+34
| | | | | | | | 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>
* logging: Create Entry dbus interfaceAdriana Kobylak2017-01-306-5/+622
| | | | | | | | Implement the generated code to create an error/event entry dbus object. Change-Id: I881636fe3e8de680d9a15fff1fe933d5e22eed06 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* logging: Commit: Use transaction id and metadata lookupAdriana Kobylak2017-01-304-24/+32
| | | | | | | | | | 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
* Log transaction id on each journal entryAdriana Kobylak2017-01-303-5/+13
| | | | | | | | | 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>
* Update test case to verify error inheritanceDeepak Kodihalli2017-01-271-4/+34
| | | | | | | Ensure inherited metadata shows up in the journal. Change-Id: I4b6c30e1439bf6a799fbb78d8e8eb6754141b568 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* elog-gen.py : implement error inheritanceDeepak Kodihalli2017-01-273-4/+23
| | | | | | | | | 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>
* elog-gen.py : order inherited errorsDeepak Kodihalli2017-01-276-11/+54
| | | | | | | | | 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>
* elog-gen.py : check error inheritanceDeepak Kodihalli2017-01-271-0/+12
| | | | | | | | 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>
* elog-gen.py : get inherited-from errorDeepak Kodihalli2017-01-272-2/+12
| | | | | | | | | | | | 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>
* elog-gen.py : read multiple error yaml filesDeepak Kodihalli2017-01-277-79/+121
| | | | | | | | | | | | | | | | 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>
* Fix types in error-logging YAML to match openbmc standardsDeepak Kodihalli2017-01-213-8/+24
| | | | | Change-Id: If5e2e534740f0675ba9294905ae531e015aed85a Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Rename <Interface>.logging.yaml to <Interface>.metadata.yamlDeepak Kodihalli2017-01-212-2/+2
| | | | | | | This change is just for brevity. Change-Id: Ie2360b19179837a1dc3675e96a4adcc2114f2bc6 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Update .gitignoreDeepak Kodihalli2017-01-211-0/+1
| | | | | Change-Id: I2c2eb03e2c52a1cbfce654348ebd6a6157625396 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add in sdbusplus dependencyAndrew Geissler2017-01-181-1/+3
| | | | | Change-Id: I414c2842840b0d623966f92b3a79d3223b52b299 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Update log manager busname to match its systemd unit fileAdriana Kobylak2017-01-122-4/+4
| | | | | Change-Id: I9431b7d3df37fe92adaa9acb5172c8cfcdb38e4e Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* log_manager: Use sdbus++Adriana Kobylak2016-12-087-113/+313
| | | | | Change-Id: Id2ad6a75b6ee3f7226c7cfd274dba24de89f9363 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* YAML for event/error logging interfacesAdriana Kobylak2016-12-021-0/+19
| | | | | | | | | 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>
* Add a .gitignore for all the automake generated filesAndrew Geissler2016-11-231-0/+23
| | | | | Change-Id: I346fb1b482ac75828013ffb7ad58d3b000fa8542 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Break elog yaml files into two piecesAndrew Geissler2016-11-233-22/+46
| | | | | | | | | 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>
* Base error log namespaces on yaml file pathAndrew Geissler2016-11-235-40/+67
| | | | | | | | | 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>
* Move the phosphor logging example yaml into sub directoryAndrew Geissler2016-11-222-1/+1
| | | | | | | | | | 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>
* Address new yaml format changes introduced by sdbusplus commit 7d7fda5Andrew Geissler2016-11-222-23/+22
| | | | | | | | 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>
* Move header generation tool and templates to sub-directoriesAndrew Geissler2016-11-184-3/+28
| | | | | | | | 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>
* Template file for error code to meta data lookupAndrew Geissler2016-11-181-0/+25
| | | | | | | | | | | | 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>
* Update elog gen script to support the dbus specified errorsAndrew Geissler2016-11-184-58/+76
| | | | | | | | 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>
* Add error/event log commit dbus methodAdriana Kobylak2016-11-091-11/+123
| | | | | | | | 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>
* Use full paths to enable bitbake builds of mako filesAndrew Geissler2016-11-091-4/+4
| | | | | | | | 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>
* Create log manager serverAdriana Kobylak2016-11-081-0/+102
| | | | | | | Error/event log dbus object with a placeholder method. Change-Id: Icfa3f0dcddb3f47a62d8480a936bd8baa4b49760 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Auto generate the error log definition hppAndrew Geissler2016-11-083-113/+41
| | | | | Change-Id: I93ad7c62aa53e3c670b8c0b1b98b1b58436a38d5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Build the required error log header file for elogsAndrew Geissler2016-11-086-73/+254
| | | | | | | | | | | | 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>
* Add exception generation to error loggingAndrew Geissler2016-11-022-7/+41
| | | | | | | | | | | | 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>
* Add in test case which validates elog client interfaceAndrew Geissler2016-10-319-50/+201
| | | | | Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Error / Event Log FrameworkAdriana Kobylak2016-10-317-0/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add logging log templateAdriana Kobylak2016-10-171-0/+143
| | | | | | | | | | | | | | | | | | | | | | 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>
* Initial commitPatrick Williams2016-07-201-0/+201
OpenPOWER on IntegriCloud