#include "madara/MADARA_export.h"
#include "madara/LockType.h"
#include <ace/Guard_T.h>
#include <vector>
#include <string>
#include <stdio.h>
#include "madara/utility/inttypes.h"
#include "Logger.inl"
Go to the source code of this file.
|
| madara |
| Copyright (c) 2015 Carnegie Mellon University.
|
|
| madara::logger |
| Provides knowledge logging services to files and terminals.
|
|
|
#define | madara_logger_cond_log(conditional, logger, alt_logger_ptr, level, ...) |
| High-performance logger that performs conditional logging based on first arg. More...
|
|
#define | madara_logger_cond_log_ptrs(conditional, logger_ptr, alt_logger_ptr, level, ...) |
| High-performance logger that performs conditional logging based on first arg. More...
|
|
#define | madara_logger_log(logger, level, ...) |
| Fast version of the madara::logger::log method. More...
|
|
#define | madara_logger_ptr_log(logger, level, ...) |
| Fast version of the madara::logger::log method for Logger pointers. More...
|
|
#define madara_logger_cond_log |
( |
|
conditional, |
|
|
|
logger, |
|
|
|
alt_logger_ptr, |
|
|
|
level, |
|
|
|
... |
|
) |
| |
Value:if (conditional && level <=
logger.get_level ()) \
logger.log (level, __VA_ARGS__); \
else \
alt_logger_ptr->log (level, __VA_ARGS__);
Provides knowledge logging services to files and terminals.
High-performance logger that performs conditional logging based on first arg.
- Parameters
-
conditional | the primary logger pointer to use (if not null) |
logger | the logger that will be used if conditional is true |
alt_logger_ptr | the secondary logger pointer to use (should be not null) |
level | the logging level |
Definition at line 56 of file Logger.h.
#define madara_logger_cond_log_ptrs |
( |
|
conditional, |
|
|
|
logger_ptr, |
|
|
|
alt_logger_ptr, |
|
|
|
level, |
|
|
|
... |
|
) |
| |
Value:if (conditional && logger_ptr && level <= logger_ptr->get_level ()) \
logger_ptr->log (level, __VA_ARGS__); \
else \
alt_logger_ptr->log (level, __VA_ARGS__);
High-performance logger that performs conditional logging based on first arg.
- Parameters
-
conditional | the primary logger pointer to use (if not null) |
logger_ptr | the logger that will be used if conditional is true |
alt_logger_ptr | the secondary logger pointer to use (should be not null) |
level | the logging level |
Definition at line 43 of file Logger.h.
#define madara_logger_log |
( |
|
logger, |
|
|
|
level, |
|
|
|
... |
|
) |
| |
Value:if (level <=
logger.get_level ()) \
logger.log (level, __VA_ARGS__);
Provides knowledge logging services to files and terminals.
Fast version of the madara::logger::log method.
This macro uses compiler optimizations to ensure that args are not evaluated unless the level is appropriate for the loggers level. This makes logging transparent and minimally invasive, performance wise
- Parameters
-
logger | the logger instance to use |
level | the logging level |
Definition at line 20 of file Logger.h.
#define madara_logger_ptr_log |
( |
|
logger, |
|
|
|
level, |
|
|
|
... |
|
) |
| |
Value:if (
logger && level <= logger->get_level ()) \
logger->log (level, __VA_ARGS__);
Provides knowledge logging services to files and terminals.
Fast version of the madara::logger::log method for Logger pointers.
This macro uses compiler optimizations to ensure that args are not evaluated unless the level is appropriate for the loggers level. This makes logging transparent and minimally invasive, performance wise
- Parameters
-
logger | the logger pointer to use |
level | the logging level |
Definition at line 32 of file Logger.h.