32 #ifndef Log_INCLUDE_ONCE 33 #define Log_INCLUDE_ONCE 52 VL_DEBUG_SET_OBJECT_NAME()
163 virtual void printImplementation(
ELogLevel level,
const String& message) = 0;
180 static void notify(
const String& message);
184 static void print(
const String& message);
188 static void debug(
const String& message);
192 static void warning(
const String& message);
196 static void error(
const String& message);
200 static void bug(
const String& message);
216 #define VL_LOG (*::vl::defLogger()) 217 #define VL_LOG_NOTIFY (VL_LOG << ::vl::LL_LogNotify) 218 #define VL_LOG_PRINT (VL_LOG << ::vl::LL_LogPrint) 219 #define VL_LOG_BUG (VL_LOG << ::vl::LL_LogBug) 220 #define VL_LOG_ERROR (VL_LOG << ::vl::LL_LogError) 221 #define VL_LOG_WARNING (VL_LOG << ::vl::LL_LogWarning) 222 #define VL_LOG_DEBUG (VL_LOG << ::vl::LL_LogDebug) 233 void setLogFile(
const String& file);
237 virtual void printImplementation(
ELogLevel level,
const String& message);
Utility class to generate logs.
Log & operator<<(ELogLevel log_level)
static String fromUInt(unsigned int value)
Creates a string representing the given unsigned integer value.
Log & operator<<(double v)
Log & operator<<(const String &str)
static String fromLongLong(long long value)
Creates a string representing the given long long value.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
Log & operator<<(const void *v)
Log & operator<<(unsigned int v)
Log & operator<<(float v)
static String fromInt(int value)
Creates a string representing the given integer value.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Log & operator<<(unsigned short v)
Visualization Library main namespace.
Log & operator<<(unsigned char v)
static String fromStdString(const std::string &str, bool utf8=true)
Initializes the string from a std::string using fromUTF() if utf8 == true (default) otherwise uses fr...
Log & operator<<(short v)
The base class for all the reference counted objects.
An interface to implement simple platform-independent mutexes used to protect critical sections...
static String fromPointer(const void *value)
Creates a string representing the given pointer.
Log & operator<<(unsigned long v)
The StandardLog class outputs the log messages on the stdout device and optionally also on a specifie...
static String fromULongLong(unsigned long long value)
Creates a string representing the given unsigned long long value.
Log & operator<<(unsigned long long v)
#define VL_INSTRUMENT_ABSTRACT_CLASS(ClassName, BaseClass)
static IMutex * logMutex()
The mutex used to synchronize concurrent calls to the log functions.
const String & logFile() const
VLCORE_EXPORT void setDefLogger(Log *logger)
Installs the default logger used by Visualization Library. Setting this to NULL will disable logging...
static String fromDouble(double value, int decimals=6)
Creates a string representing the given double value The value of 'decimals' can be between 0 and 20...
Log & operator<<(long long v)
Log & operator<<(const std::string &v)
static void setLogMutex(IMutex *mutex)
The mutex used to synchronize concurrent calls to the log functions.
VLCORE_EXPORT Log * defLogger()
Returns the currently installed default logger.
Log & operator<<(const char *v)