summaryrefslogtreecommitdiffstats
path: root/phosphor-logging
Commit message (Collapse)AuthorAgeFilesLines
* log: Re-order to fix return type deductionWilliam A. Kennington III2019-07-121-60/+52
| | | | | | | | | | | The entry(...) function definition needs to come before the log function since it depends on knowing the return type of the entry it is generating. Technically this is never an issue because a concrete log(...) call is never used before entry(...) is defined, but static analyzers are unhappy about it. Change-Id: Ia784851ffed5436474d5f6a44d78343a9be8d231 Signed-off-by: William A. Kennington III <wak@google.com>
* Fix format issueMatt Spinler2019-07-021-1/+2
| | | | | | | | This has been wrong for awhile, but was only now flagged by CI on gerrit. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2a66fe6e727922d48b77e99feeebd9d5b95f617f
* elog: Add noreturn attributeWilliam A. Kennington III2019-04-111-2/+1
| | | | | | | | | We need to signal to the compiler that elog() always throws. This allows the compiler to deduce that we have unreachable code after the elog() statement, instead of a assuming that it might be reachable. Change-Id: If6c41773d3a0dde94d44481ad6ecd719365c515a Signed-off-by: William A. Kennington III <wak@google.com>
* disable journal interface call-throughPatrick Venture2019-01-031-1/+3
| | | | | | | | | | | | The pass-through isn't working as expected, therefore disable it. This patchset disables the call to the sd journal interface object and instead calls sdbus directly as it had previously. This will break any tests that pass through log<>, but that will be revisited. Change-Id: I59aa914d21405a2c5b9746d7d98958912078cc87 Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: rename method to match implementationPatrick Venture2018-12-041-1/+1
| | | | | | | | The object was renamed and the change didn't propogate. Change-Id: Ia4868b426ab187187a05bd0047ac8c7a98aa984b Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: add fixes to mock classPatrick Venture2018-12-031-2/+4
| | | | | | | | | | | | | The mock class is only compiled when included. Add a missing semicolon to the class definition. The interface class was renamed, update the name from which the mock class derives. Tested: Added a local instance of the object that forces compilation. Change-Id: I65dd92e1e29d0cf0532ebe209b356d3d8fe4f1d8 Signed-off-by: Patrick Venture <venture@google.com>
* add sdjournal interface to inject testsPatrick Venture2018-11-113-1/+101
| | | | | | | | The goal of the tests is not to test phosphor-logging, but rather allow code to call through phosphor-logging/log<> during a test. Change-Id: Id8c84ded473decc7f9f0be268116083093f86e54 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-10-262-103/+88
| | | | | Change-Id: I2c36b7886a25d0b235693b0776019d29608e1d52 Signed-off-by: Patrick Venture <venture@google.com>
* static_assert typeof log message entriesJoseph Reynolds2018-06-221-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Please wait to commit this review until all of the code that causes static_assert failures is committed. Resolves openbmc/openbmc#2905 Tested: static_assert only phosphor-logging now static_asserts that each item to be converted by the printf-like function has integral, enum, floating_point, or pointer type and each format argument has a type that decays to a char * type. Specifically, std::string fails the assertion because its address would be logged and not the string buffer. You probably want your strings to use s.c_str(). Note that we considered automatically applying c_str() to string objects, but the underlying entry function is constexpr which makes that impossible. Change-Id: I88f6c626d58254eaad9b1a44e6a9c693d2fc6cd9 Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
* Implement ability to override default error levelDeepak Kodihalli2018-04-091-0/+57
| | | | | | | | | | | | | Errors reported by the phosphor-logging app have a default error level, and this level is specified in the error's YAML definition. Enable users of the error's report() API to specify an error level. A user may perceive a different error level for an error scenario, for eg there may be certain host errors (for which we set the level as 'Error') that may just be 'Warnings'. Change-Id: I666a0ddcb099e530c423358a3b1c65f33b0ad01e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Remove elog-errors-HostEvent.hpp from phosphor-logging repoTom Joseph2017-07-251-76/+0
| | | | | | | Resolves openbmc/phosphor-logging#4 Change-Id: I15ccdef0dd63216991bbd113e47beb057df14df8 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Use sdbusplus errName instead of phosphor errName in commitMarri Devender Rao2017-06-031-1/+1
| | | | | Change-Id: I2e5e1add72ee4fa29ecb8e858b101bbd648aeeec Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Host event error should be logged as ERR instead of INFOMarri Devender Rao2017-05-261-2/+2
| | | | | Change-Id: I34555ba7c4a61f8bd7fa423719429e8d990e2488 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Add new report interfaceMarri Devender Rao2017-04-121-0/+29
| | | | | | | | Added new report interface that creates elog entry and also commits it Change-Id: I68ebbd25561617774f498be073df4ecb627e0ef9 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Add new commit API and deprecate older commit methodMarri Devender Rao2017-04-122-7/+52
| | | | | | | | Added new commit method that accepts an sdbusplus exception Deprecate commit which accepts an exception name Change-Id: I9b5c91eb13466eb576c329ebb7fd00ce33f7dd9f Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Map sdbusplus exception to phosphor exceptionDeepak Kodihalli2017-03-151-19/+21
| | | | | | | | | | | | | Errors will be created by using the sdbusplus error types, which results in an sdbusplus exception being thrown. Error metadata can be verified at compile-time by checking the error against phosphor-logging error types. This commit maps the sdbusplus error type to the phosphor type, for this purpose, via template specializations. Change-Id: Iee37e2a3846cc3acf3a62270a520ff0c395fd36d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Use configure option yaml path to generate elog-errors.hppAdriana Kobylak2017-03-011-0/+1
| | | | | | | | | | | | Add a config variable that can be passed via a recipe to point the parser to a directory where the error yaml files are. Rename elog-gen.hpp to elog-errors.hpp, which better matches the exception error log file names. Include elog-gen.hpp in elog.hpp so that callers that need to create and commit error logs only need to include one header file. Change-Id: Ie3cd65ac761c1f7b2c99c50a2273859283a5ab4b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Moved log.hpp and elog.hpp to a folder under phosphor-loggingSaqib Khan2017-02-203-0/+329
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>
OpenPOWER on IntegriCloud