In development. It changes without notice.
Topic
Logging
The log: one macro for each level, dropped when it is compiled below the level of the build.
The macros are there so that a message a build leaves out costs nothing: its text is not in the image and its arguments are not evaluated. There are forms for an interrupt and for the time before the scheduler runs.
A message says why something failed and never holds a secret, its length or an account's name.
- See also
- Diagnostics
Files | |
| file | src/ |
| ESP-IDF logging facade implementation (KLEIDOS_LOG* helpers). | |
| file | src/ |
| ESP-IDF logging facade and KLEIDOS_LOG* macro family. | |
Namespaces | |
| namespace | kleidos:: |
| Log levels per tag over ESP-IDF's logging, the hook its output goes through, and the silence of every tag for a scope. | |
Classes | |
| class | kleidos:: |
| Silence every log tag for a scope, then put the level back. More about kleidos:: | |
Typedefs | |
| using | kleidos:: |
| esp_log vprintf hook type. | |
Enumerations | |
| enum class | kleidos:: |
| Log verbosity level (mirrors esp_ | |
Functions | |
| esp_ | kleidos:: |
| Convert a Kleidos Level to the ESP-IDF esp_ | |
| Level | kleidos:: |
| Convert an ESP-IDF esp_ | |
| void | kleidos:: |
| Set the runtime log level for a tag. | |
| Level | kleidos:: |
| Return the current runtime log level for a tag. | |
| VprintfHook | kleidos:: |
| Install a log sink function; returns the previous sink. | |
Enumeration Type Documentation
Level #
enum class kleidos:: platform:: logger:: Level : uint8_t
Function Documentation
fromEsp() #
Convert an ESP-IDF esp_
- Parameters
-
Name Meaning level ESP-IDF log level.
- Return values
-
Value Meaning Level::None No logging. Level::Error Errors only. Level:: Warning Warnings and above. Level::Info Informational and above. Level::Debug Debug and above. Level:: Verbose Everything.
levelFor() #
Return the current runtime log level for a tag.
- Parameters
-
Name Meaning tag Log tag string.
- Return values
-
Value Meaning Level::None No messages will be emitted for tag.Level::Error Errors only. Level:: Warning Warnings and above. Level::Info Informational and above. Level::Debug Debug and above. Level:: Verbose Everything.
setLevel() #
Set the runtime log level for a tag.
- Parameters
-
Name Meaning tag Log tag string (matched by prefix). level New minimum level for the tag.
setVprintf() #
Install a log sink function; returns the previous sink.
- Parameters
-
Name Meaning hook New vprintf-compatible log function.
- Returns
- Previously installed hook (or the default ESP-IDF vprintf).