Classes | Namespaces | Macros | Enumerations | Functions
log.h File Reference
#include <inttypes.h>
#include <memory>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  urcl::LogHandler
 Inherit from this class to change the behavior when logging messages. More...
 

Namespaces

 urcl
 

Macros

#define URCL_LOG_DEBUG(...)   urcl::log(__FILE__, __LINE__, urcl::LogLevel::DEBUG, __VA_ARGS__)
 
#define URCL_LOG_ERROR(...)   urcl::log(__FILE__, __LINE__, urcl::LogLevel::ERROR, __VA_ARGS__)
 
#define URCL_LOG_FATAL(...)   urcl::log(__FILE__, __LINE__, urcl::LogLevel::FATAL, __VA_ARGS__)
 
#define URCL_LOG_INFO(...)   urcl::log(__FILE__, __LINE__, urcl::LogLevel::INFO, __VA_ARGS__)
 
#define URCL_LOG_WARN(...)   urcl::log(__FILE__, __LINE__, urcl::LogLevel::WARN, __VA_ARGS__)
 

Enumerations

enum  urcl::LogLevel {
  urcl::LogLevel::DEBUG = 0, urcl::LogLevel::INFO, urcl::LogLevel::WARN, urcl::LogLevel::ERROR,
  urcl::LogLevel::FATAL, urcl::LogLevel::NONE
}
 Different log levels. More...
 

Functions

void urcl::log (const char *file, int line, LogLevel level, const char *fmt,...)
 Log a message, this is used internally by the macros to unpack the log message. Use the macros instead of this function directly. More...
 
void urcl::registerLogHandler (std::unique_ptr< LogHandler > loghandler)
 Register a new LogHandler object, for handling log messages. More...
 
void urcl::setLogLevel (LogLevel level)
 Set log level this will disable messages with lower log level. More...
 
void urcl::unregisterLogHandler ()
 Unregister current log handler, this will enable default log handler. More...
 

Macro Definition Documentation

#define URCL_LOG_DEBUG (   ...)    urcl::log(__FILE__, __LINE__, urcl::LogLevel::DEBUG, __VA_ARGS__)

Definition at line 34 of file log.h.

#define URCL_LOG_ERROR (   ...)    urcl::log(__FILE__, __LINE__, urcl::LogLevel::ERROR, __VA_ARGS__)

Definition at line 37 of file log.h.

#define URCL_LOG_FATAL (   ...)    urcl::log(__FILE__, __LINE__, urcl::LogLevel::FATAL, __VA_ARGS__)

Definition at line 38 of file log.h.

#define URCL_LOG_INFO (   ...)    urcl::log(__FILE__, __LINE__, urcl::LogLevel::INFO, __VA_ARGS__)

Definition at line 36 of file log.h.

#define URCL_LOG_WARN (   ...)    urcl::log(__FILE__, __LINE__, urcl::LogLevel::WARN, __VA_ARGS__)

Definition at line 35 of file log.h.



ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26