Embedded Multicore Building Blocks V1.0.0
|
Simple logging facilities. More...
#include <log.h>
Static Public Member Functions | |
static void | SetLogLevel (embb_log_level_t log_level) |
Sets the global log level. More... | |
static void | SetLogFunction (void *context, embb_log_function_t func) |
Sets the global logging function. More... | |
static void | Write (char const *channel, embb_log_level_t log_level, char const *message,...) |
Logs a message to the given channel with the specified log level. More... | |
static void | Trace (char const *channel, char const *message,...) |
Logs a message to the given channel with EMBB_LOG_LEVEL_TRACE. More... | |
static void | Info (char const *channel, char const *message,...) |
Logs a message to the given channel with EMBB_LOG_LEVEL_INFO. More... | |
static void | Warning (char const *channel, char const *message,...) |
Logs a message to the given channel with EMBB_LOG_LEVEL_WARNING. More... | |
static void | Error (char const *channel, char const *message,...) |
Logs a message to the given channel with EMBB_LOG_LEVEL_ERROR. More... | |
Simple logging facilities.
|
static |
Sets the global log level.
This determines what messages will be shown, messages with a more detailed log level will be filtered out. The default log level is EMBB_LOG_LEVEL_NONE.
[in] | log_level | Log level to use for filtering |
|
static |
Sets the global logging function.
The logging function implements the mechanism for transferring log messages to their destination. context
is a pointer to data the user needs in the function to determine where the messages should go (may be NULL if no additional data is needed). The default logging function is embb_log_write_file() with context set to stdout
.
[in] | context | User context to supply as the first parameter of the logging function |
[in] | func | The logging function |
|
static |
Logs a message to the given channel with the specified log level.
If the log level is greater than the configured log level for the channel, the message will be ignored.
[in] | channel | User specified channel id for filtering the log later on. Might be NULL, channel identifier will be "global" in that case |
[in] | log_level | Log level to use |
[in] | message | Message to convey, may use printf style formatting |
|
static |
Logs a message to the given channel with EMBB_LOG_LEVEL_TRACE.
In non-debug builds, this function does nothing.
[in] | channel | User specified channel id |
[in] | message | Message to convey, may use printf style formatting |
|
static |
Logs a message to the given channel with EMBB_LOG_LEVEL_INFO.
In non-debug builds, this function does nothing.
[in] | channel | User specified channel id |
[in] | message | Message to convey, may use printf style formatting |
|
static |
Logs a message to the given channel with EMBB_LOG_LEVEL_WARNING.
[in] | channel | User specified channel id |
[in] | message | Message to convey, may use printf style formatting |
|
static |
Logs a message to the given channel with EMBB_LOG_LEVEL_ERROR.
[in] | channel | User specified channel id |
[in] | message | Message to convey, may use printf style formatting |