![]() |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Logger class is responsible for sending log messages via WSTP to Mathematica.
It may be more convenient to use one of the LLU_DEBUG/WARNING/ERROR macros instead of calling Logger methods directly.
#include <Logger.h>
Public Types | |
| enum | Level { Debug, Warning, Error } |
| Possible log severity levels. More... | |
Static Public Member Functions | |
| template<Level L, typename... T> | |
| static void | log (WolframLibraryData libData, int line, const std::string &fileName, const std::string &function, T &&... args) |
| Send a log message of given severity. More... | |
| template<Level L, typename... T> | |
| static void | log (int line, const std::string &fileName, const std::string &function, T &&... args) |
| Send a log message of given severity. More... | |
| static std::string | to_string (Level l) |
| Converts Logger::Level value to std::string. More... | |
| static void | setContext (std::string context) |
| Set new context for the top-level symbol that will handle logging. More... | |
| static std::string | getSymbol () |
| Get the top-level symbol with full context, to which all logs are sent. More... | |
|
strong |
Possible log severity levels.
|
inlinestatic |
Get the top-level symbol with full context, to which all logs are sent.
|
static |
Send a log message of given severity.
| L | - log level, severity of the log |
| T | - any number of WSTP-supported types |
| line | - line number where the log was called |
| fileName | - name of the file in which the log was called |
| function | - function in which the log was called |
| args | - additional parameters carrying the actual log message contents |
|
static |
Send a log message of given severity.
| L | - log level, severity of the log |
| T | - any number of WSTP-supported types |
| libData | - WolframLibraryData, if nullptr - no logging happens |
| line | - line number where the log was called |
| fileName | - name of the file in which the log was called |
| function | - function in which the log was called |
| args | - additional parameters carrying the actual log message contents |
|
inlinestatic |
Set new context for the top-level symbol that will handle logging.
| context | - new context, must end with "`" |
|
static |
Converts Logger::Level value to std::string.
| l | - log level |