Add configurable log level for cerr outputWhen directly running an executable which utilizes lg2, all logs areshown by default. Currently, we can only disable them entirely withoutany filtering o
Add configurable log level for cerr outputWhen directly running an executable which utilizes lg2, all logs areshown by default. Currently, we can only disable them entirely withoutany filtering options.This commit adds the LG2_LOG_LEVEL environment variable for logfiltering. It allows runtime control of log verbosity by settingLG2_LOG_LEVEL to desired maximum log level (0-7). Messages above thislevel are filtered out. Defaults to 7 (all levels) if not set.Tested:Logs are properly filtered when the env variable is setChange-Id: Ibe44d9971550d3b74ef818a00f7d6b364eb0212cSigned-off-by: Piotr Sulewski <piotrx.sulewski@intel.com>
show more ...
lg2: Add path to list of supported types in docsUpdate the documentation on the lg2 API to include std::filesystem::pathin the list of supported types.Also updated a README.md that was failing C
lg2: Add path to list of supported types in docsUpdate the documentation on the lg2 API to include std::filesystem::pathin the list of supported types.Also updated a README.md that was failing CI due to a line that was toolong for the formatting checks.Change-Id: I61a3694d6ad994155829d433a62b2f4a05980e3dSigned-off-by: Shawn McCarney <shawnmm@us.ibm.com>
lg2: update structured-logging with latest conversionsSigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: I299eb37a617f8ba9cbeb94b63f817338a7e9a921
Address markdownlint warningsAddressed markdownlint warnings reported by"../openbmc-build-scripts/scripts/format-code.sh --enable markdownlint"Tested: Verified and fixed warnings using"../openb
Address markdownlint warningsAddressed markdownlint warnings reported by"../openbmc-build-scripts/scripts/format-code.sh --enable markdownlint"Tested: Verified and fixed warnings using"../openbmc-build-scripts/scripts/format-code.sh --enable markdownlint"Change-Id: I6f8fe65373c748b907b9ca55c527800583983538Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
prettier: re-formatPrettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAMLfiles to have consistent formatting for these file types. Re-run theformatter on the whole repository.
prettier: re-formatPrettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAMLfiles to have consistent formatting for these file types. Re-run theformatter on the whole repository.Change-Id: I6e8d56540a30898369d7f232d900fd74de2e7bd1Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Enable lg2 log output to stderr in OpenBMC CI testSimilar to printing logs to stderr in a TTY, output to stderr can beenabled during OpenBMC CI test by setting the `LG2_FORCE_STDERR`environment v
Enable lg2 log output to stderr in OpenBMC CI testSimilar to printing logs to stderr in a TTY, output to stderr can beenabled during OpenBMC CI test by setting the `LG2_FORCE_STDERR`environment variable to any value.Using meson, this can be done with something like: test('test_name', executable(...), env: ['LG2_FORCE_STDERR=yes'])Signed-off-by: Zane Shelley <zshelle@us.ibm.com>Change-Id: I0323fbb75fe211148ec4dc7e263fe18aabb8ffc6
lg2: reduce stdout and allow customizationIt was reported by users that the information logged to the TTY was toomuch in many cases, which limited the usability of lg2. Allow users tocustomize t
lg2: reduce stdout and allow customizationIt was reported by users that the information logged to the TTY was toomuch in many cases, which limited the usability of lg2. Allow users tocustomize the output by setting the "LG2_FORMAT" environment variableand limit the default output to just "<level> message".Tested:Added a simple log to the beginning of an existing daemon and testedformat strings:``` $ ./health-monitor <6> Here I am! $ LG2_FORMAT="{%l} %m %% [%f:%L:%F]|%" ./health-monitor {6} Here I am! % [int main():511:../healthMonitor.cpp]|%```Resolves openbmc/phosphor-logging#26.Signed-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: Ie50c90f073539812c0693d05fc04ce7ad2b3fbcd
lg2: support exception conversionSigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: I4b3cb55c9d03ed04b1f072bf3f5ef98ccffb0eef
lg2: support sdbusplus enum conversionSigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: I78cb28697631499adf5be64f7157a894c8d887ee
lg2: introduce motivation and APISigned-off-by: Patrick Williams <patrick@stwcx.xyz>Change-Id: I519756bbbf84ce024b1a117013868c3c11ebdecb