Turi Create
4.0
|
Global Logging Statements. More...
Macros | |
#define | logger(lvl, fmt, ...) |
#define | logstream(lvl) |
#define | logger_once(lvl, fmt, ...) |
#define | logstream_once(lvl) |
#define | logger_ontick(sec, lvl, fmt, ...) |
#define | logstream_ontick(sec, lvl) |
#define | logprogress(fmt, ...) logger(LOG_PROGRESS, fmt, ##__VA_ARGS__) |
#define | logprogress_stream logstream(LOG_PROGRESS) |
#define | logprogress_ontick(sec, fmt, ...) logger_ontick(sec, LOG_PROGRESS, fmt, ##__VA_ARGS__) |
#define | logprogress_stream_ontick(sec) logstream_ontick(sec, LOG_PROGRESS) |
Global Logging Statements.
#define logger | ( | lvl, | |
fmt, | |||
... | |||
) |
Emits a log line output in printf format at a particular log level. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process.
Example:
Definition at line 268 of file logger.hpp.
#define logger_once | ( | lvl, | |
fmt, | |||
... | |||
) |
Emits a log line output in printf format at a particular log level, only the first time the line is encountered. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process.
Example:
Definition at line 281 of file logger.hpp.
#define logger_ontick | ( | sec, | |
lvl, | |||
fmt, | |||
... | |||
) |
Emits a log line output in printf format at a particular log level, but will only print approximately once every "sec" seconds. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process.
Example:
Definition at line 300 of file logger.hpp.
#define logprogress | ( | fmt, | |
... | |||
) | logger(LOG_PROGRESS, fmt, ##__VA_ARGS__) |
Emits a progress message using printf format.
Example:
Definition at line 324 of file logger.hpp.
#define logprogress_ontick | ( | sec, | |
fmt, | |||
... | |||
) | logger_ontick(sec, LOG_PROGRESS, fmt, ##__VA_ARGS__) |
Emits a progress message using printf format, but will only print approximately once every "sec" seconds. Example:
Definition at line 327 of file logger.hpp.
#define logprogress_stream logstream(LOG_PROGRESS) |
Emits a progress message using a stream. The stream must terminate with a "\n" or std::endl at the end of the message.
Example:
Definition at line 325 of file logger.hpp.
#define logprogress_stream_ontick | ( | sec | ) | logstream_ontick(sec, LOG_PROGRESS) |
Emits a progress message using a stream. The stream must terminate with a "\n" or std::endl at the end of the message. This will only print approximately once every "sec" seconds. The stream must terminate with a "\n" or std::endl at the end of the message.
Example:
Definition at line 328 of file logger.hpp.
#define logstream | ( | lvl | ) |
An output stream for specified log level. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process. The stream must terminate with a "\n" or std::endl at the end of the message.
Example:
Definition at line 276 of file logger.hpp.
#define logstream_once | ( | lvl | ) |
An output stream for specified log level. This will only output the first time the line is encountered. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process. The stream must terminate with a "\n" or std::endl at the end of the message.
Example:
Definition at line 291 of file logger.hpp.
#define logstream_ontick | ( | sec, | |
lvl | |||
) |
An output stream for specified log level. This will only print approximately once every "sec" seconds. lvl must be one of the log levels from LOG_DEBUG to LOG_FATAL. Emitting a LOG_FATAL will kill the process. The stream must terminate with a "\n" or std::endl at the end of the message.
Example:
Definition at line 311 of file logger.hpp.