Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
logging.h
Go to the documentation of this file.
1
10#pragma once
11#include <string>
12#include <ostream>
13
14#ifdef WIN32
15# ifdef COMPILING_DLL_SimulatedRealityCore
16# define DIMENCOSR_API __declspec(dllexport)
17# else
18# define DIMENCOSR_API __declspec(dllimport)
19# endif
20#else
21# define DIMENCOSR_API
22#endif
23
24namespace SR {
25
29enum Verbosity : int {
33 NoLogging = 3
34};
35
44public:
62 static void initialize(Verbosity verbosity, std::string logPath, std::string logFilePrefix);
63
82 static void initializeToFile(Verbosity verbosity, std::string logPath, std::string logFilePrefix);
83
89 static void debugInfo(std::string message);
90
96 static void info(std::string message);
97
103 static void warning(std::string message);
104
112 static void error(std::string message);
113
119 static void flush();
120
126};
127
128}
129
130#undef DIMENCOSR_API
Class with static logging functionality.
Definition: logging.h:43
static void initializeCrashCallBack()
static void flush()
Flushes the log.
static void error(std::string message)
Logs an error message.
static void debugInfo(std::string message)
Logs an informative message if the compiled in debug mode.
static void initializeToFile(Verbosity verbosity, std::string logPath, std::string logFilePrefix)
Initialize underlying logging implementation (GLog) with file logging only.
static void warning(std::string message)
Logs an warning message.
static void info(std::string message)
Logs an informative message.
static void initialize(Verbosity verbosity, std::string logPath, std::string logFilePrefix)
Initialize underlying logging implementation (GLog), logs both to file and console.
#define DIMENCOSR_API
Definition: logging.h:21
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:25
Verbosity
Verbosity level enumeration.
Definition: logging.h:29
@ HighVerbosity
Definition: logging.h:30
@ LowVerbosity
Definition: logging.h:32
@ NoLogging
Definition: logging.h:33
@ MediumVerbosity
Definition: logging.h:31