27 #ifndef INCLUDED_Log_h_GUID_B6053E2B_593D_4ECA_8C3B_2C55D0FE6A49 28 #define INCLUDED_Log_h_GUID_B6053E2B_593D_4ECA_8C3B_2C55D0FE6A49 31 #include <osvr/Util/Export.h> 43 #undef OSVR_USE_UNIQUEPTR_FOR_LOGGER 49 #ifdef OSVR_USE_UNIQUEPTR_FOR_LOGGER 50 typedef unique_ptr<Logger> LoggerPtr;
51 typedef shared_ptr<Logger> LoggerSharedPtr;
53 typedef shared_ptr<Logger> LoggerPtr;
71 OSVR_UTIL_EXPORT LoggerPtr
make_logger(
const std::string &logger_name);
78 OSVR_UTIL_EXPORT
void drop(
const std::string &logger_name);
84 OSVR_UTIL_EXPORT
void dropAll();
88 OSVR_UTIL_EXPORT
void flush();
90 OSVR_UTIL_EXPORT std::string getLoggingDirectory(
bool make_dir =
false);
96 #endif // INCLUDED_Log_h_GUID_B6053E2B_593D_4ECA_8C3B_2C55D0FE6A49 Definition: RunLoopManager.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_UTIL_EXPORT void dropAll()
Removes all the registered loggers from the registry.
Definition: Log.cpp:96
OSVR_UTIL_EXPORT void flush()
For implementations with a centralized logger registry, flush all logger sinks.
Definition: Log.cpp:100
Header to bring unique_ptr into the osvr namespace.
Header to bring shared_ptr into the osvr namespace.
OSVR_UTIL_EXPORT LoggerPtr make_logger(const std::string &logger_name)
Make (or get from the registry) a logger by name.
Definition: Log.cpp:81
OSVR_UTIL_EXPORT bool tryInitializingLoggingWithBaseName(std::string const &baseName)
Attempt to initialize the logging system with the indicated base filename (will be stripped of all ch...
Definition: Log.cpp:104
OSVR_UTIL_EXPORT void drop(const std::string &logger_name)
Drops a logger from the registry.
Definition: Log.cpp:92