kdriveExpress Logger API More...
#include "kdrive_express_config.h"
Go to the source code of this file.
Macros | |
#define | KDRIVE_LOGGER_NONE (0) |
No logger. More... | |
#define | KDRIVE_LOGGER_FATAL (1) |
A fatal error. More... | |
#define | KDRIVE_LOGGER_CRITICAL (2) |
A critical error. More... | |
#define | KDRIVE_LOGGER_ERROR (3) |
An error. More... | |
#define | KDRIVE_LOGGER_WARNING (4) |
A warning. More... | |
#define | KDRIVE_LOGGER_NOTICE (5) |
A notice, which is an information with just a higher priority. More... | |
#define | KDRIVE_LOGGER_INFORMATION (6) |
An informational message, usually denoting the successful completion of an operation. More... | |
#define | KDRIVE_LOGGER_DEBUG (7) |
A debugging message. More... | |
#define | KDRIVE_LOGGER_TRACE (8) |
A tracing message. More... | |
Typedefs | |
typedef void(* | kdrive_logger_callback) (uint8_t level, const char *message) |
Logger Callback function type (pointer to function definition) More... | |
Functions | |
kdriveExpress_API void | kdrive_logger_set_level (uint8_t level) |
Sets the root logger level This is once of: More... | |
kdriveExpress_API void | kdrive_logger_console (void) |
Sets the logger to write to the console. More... | |
kdriveExpress_API void | kdrive_logger_file (void) |
Set the logger to write to a file The file is written to the current path as logfile_pid where pid is the process id. More... | |
kdriveExpress_API void | kdrive_logger_file_ex (const char *filename) |
Set the logger to write to a specified file. More... | |
kdriveExpress_API void | kdrive_logger_syslog (const char *address, const char *name) |
Set the logger to write to a remote host with the syslog protocol. More... | |
kdriveExpress_API void | kdrive_logger_set_callback (kdrive_logger_callback c) |
Set the logger to call a user callback function. More... | |
kdriveExpress_API void | kdrive_logger (uint8_t level, const char *message) |
Writes to the kdrive express logger. More... | |
kdriveExpress_API void | kdrive_logger_ex (uint8_t level, const char *fmt,...) |
Writes to the kdrive express logger. More... | |
kdriveExpress_API void | kdrive_logger_dump (uint8_t level, const char *message, const void *buffer, uint32_t buffer_len) |
Logs the given message, followed by the data in buffer. More... | |
kdriveExpress Logger API
#define KDRIVE_LOGGER_CRITICAL (2) |
A critical error.
The application might not be able to continue running successfully.
#define KDRIVE_LOGGER_DEBUG (7) |
A debugging message.
#define KDRIVE_LOGGER_ERROR (3) |
An error.
An operation did not complete successfully, but the application as a whole is not affected.
#define KDRIVE_LOGGER_FATAL (1) |
A fatal error.
The application will most likely terminate. This is the highest priority.
#define KDRIVE_LOGGER_INFORMATION (6) |
An informational message, usually denoting the successful completion of an operation.
#define KDRIVE_LOGGER_NONE (0) |
No logger.
#define KDRIVE_LOGGER_NOTICE (5) |
A notice, which is an information with just a higher priority.
#define KDRIVE_LOGGER_TRACE (8) |
A tracing message.
This is the lowest priority.
#define KDRIVE_LOGGER_WARNING (4) |
A warning.
An operation completed with an unexpected result.
typedef void(* kdrive_logger_callback) (uint8_t level, const char *message) |
Logger Callback function type (pointer to function definition)
[in] | level | the logger level (priority) |
[in] | message | the log message |