SA_Logger
Sapphire's Suite's C++ Logger.
|
Log Helper Macros implementation. More...
#include <iostream>
#include <SA/Support/Debug.hpp>
#include <SA/Logger/Log/Log.hpp>
#include <SA/Logger/Misc/StringFormat.hpp>
#include <SA/Logger/Preprocessors/FileName.hpp>
#include <SA/Logger/Preprocessors/FunctionName.hpp>
#include <SA/Logger/Preprocessors/ChannelName.hpp>
#include <SA/Logger/Preprocessors/Unparenthese.hpp>
Go to the source code of this file.
Namespaces | |
namespace | SA::Debug |
Global Debug namespace. | |
Macros | |
#define | SA_LOG_END_OF_FRAME() |
Sapphire Log end of frame macro. | |
#define | SA_LOG((_str, _args) , _lvl, _chan, _dets) |
Sapphire Log macro. | |
#define | SA_WARN(_pred, _chan, _dets, _postCmd) |
#define | SA_ERROR(_pred, _chan, _dets, _postCmd) |
Sapphire Log "error if" macro. | |
Variables | |
LoggerBase * | SA::Debug::logger |
Logger instance. | |
void(* | SA::Debug::logCB )(SA::Log) |
Simple logger callback. | |
Log Helper Macros implementation.
#define SA_ERROR | ( | _pred, | |
_chan, | |||
_dets, | |||
_postCmd ) |
Sapphire Log "error if" macro.
Helper macro to use conditionnal Debug::Log error.
[in] | _pred | predicate of the Log. Output error on false. |
[in] | _chan | Channel of the log (optional). |
[in] | _dets | Details string of the log (optional). |
[in] | _postCmd | Post-log command on true predicate, usually for return value (optional). |
#define SA_LOG | ( | ) | , _lvl, _chan, _dets) |
Sapphire Log macro.
Helper macro to use Debug::Log.
[in] | _str | String message of the log. Parentheses are optionnal for single string or object. |
[in] | _args | Arguments to insert in string using %<num>. Must add parentheses surrounding: (_str, _args). |
[in] | _lvl | Level of the log (optional). |
[in] | _chan | Channel of the log (optional). |
[in] | _dets | Details string of the log (optional). |
#define SA_LOG_END_OF_FRAME | ( | ) |
Sapphire Log end of frame macro.
Helper macro to track frame number used for logging.