Evo logging.
More...
#include "io.h"
#include "file.h"
#include "substring.h"
#include "atomic_buffer_queue.h"
#include "thread.h"
#include "time.h"
#include "enum.h"
Go to the source code of this file.
|
| evo |
| Evo C++ Library namespace.
|
|
|
#define | EVO_LOG_ALERT(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_ALERT)) LOGGER.log_direct(LOG_LEVEL_ALERT, MSG); } |
| Helper macro for logging an alert with Logger. More...
|
|
#define | EVO_LOG_DEBUG(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_DEBUG)) LOGGER.log_direct(LOG_LEVEL_DEBUG, MSG); } |
| Helper macro for logging a debug message with Logger. More...
|
|
#define | EVO_LOG_DEBUG_LOW(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_DEBUG_LOW)) LOGGER.log_direct(LOG_LEVEL_DEBUG_LOW, MSG); } |
| Helper macro for logging a low-level debug message with Logger. More...
|
|
#define | EVO_LOG_ERROR(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_ERROR)) LOGGER.log_direct(LOG_LEVEL_ERROR, MSG); } |
| Helper macro for logging an error with Logger. More...
|
|
#define | EVO_LOG_INFO(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_INFO)) LOGGER.log_direct(LOG_LEVEL_INFO, MSG); } |
| Helper macro for logging an informational message with Logger. More...
|
|
#define | EVO_LOG_WARN(LOGGER, MSG) { if (LOGGER.check(LOG_LEVEL_WARN)) LOGGER.log_direct(LOG_LEVEL_WARN, MSG); } |
| Helper macro for logging a warning with Logger. More...
|
|
#define | INCL_evo_logger_h |
|
◆ EVO_LOG_ALERT
#define EVO_LOG_ALERT |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_ALERT)) LOGGER.log_direct(LOG_LEVEL_ALERT, MSG); } |
Helper macro for logging an alert with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_ALERT(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_ALERT
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ EVO_LOG_DEBUG
#define EVO_LOG_DEBUG |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_DEBUG)) LOGGER.log_direct(LOG_LEVEL_DEBUG, MSG); } |
Helper macro for logging a debug message with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_DEBUG(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_DEBUG
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ EVO_LOG_DEBUG_LOW
#define EVO_LOG_DEBUG_LOW |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_DEBUG_LOW)) LOGGER.log_direct(LOG_LEVEL_DEBUG_LOW, MSG); } |
Helper macro for logging a low-level debug message with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_DEBUG_LOW(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_DEBUG_LOW
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ EVO_LOG_ERROR
#define EVO_LOG_ERROR |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_ERROR)) LOGGER.log_direct(LOG_LEVEL_ERROR, MSG); } |
Helper macro for logging an error with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_ERROR(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_ERROR
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ EVO_LOG_INFO
#define EVO_LOG_INFO |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_INFO)) LOGGER.log_direct(LOG_LEVEL_INFO, MSG); } |
Helper macro for logging an informational message with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_INFO(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_INFO
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ EVO_LOG_WARN
#define EVO_LOG_WARN |
( |
|
LOGGER, |
|
|
|
MSG |
|
) |
| { if (LOGGER.check(LOG_LEVEL_WARN)) LOGGER.log_direct(LOG_LEVEL_WARN, MSG); } |
Helper macro for logging a warning with Logger.
- This calls
LOGGER.check()
to check if a message at this level matches the current log level, and if so then calls LOGGER.log_direct()
to log the message
- Formatting can be done inline with
MSG
, for example: String msg;
...
EVO_LOG_WARN(logger, 0, msg.set() << "Hello " << 123)
MSG
is only evaluated if it will be logged, which saves from allocating and formatting messages that won't be logged
- See Logger and LOG_LEVEL_WARN
- Parameters
-
LOGGER | The logger to use |
MSG | Message string to log, passed as const SubString& |
◆ INCL_evo_logger_h
#define INCL_evo_logger_h |