Castor3D 0.16.0
Multiplatform 3D engine
|
#include <LoggerInstance.hpp>
Public Member Functions | |
LoggerInstance (LoggerInstance const &)=delete | |
LoggerInstance & | operator= (LoggerInstance const &)=delete |
CU_API | LoggerInstance (LoggerInstance &&rhs) noexcept |
CU_API LoggerInstance & | operator= (LoggerInstance &&rhs) noexcept |
CU_API | ~LoggerInstance () noexcept |
CU_API | LoggerInstance (ProgramConsole &console, LogType logType) |
sets the log file address. | |
CU_API void | registerCallback (LogCallback const &callback, void *caller) |
Registers the logging callback. | |
CU_API void | unregisterCallback (void *caller) |
Unregisters the logging callback. | |
CU_API void | setFileName (Path const &logFilePath, LogType logType=LogType::eCount) |
sets the log file address | |
CU_API LogType | getLevel () const |
template<typename CharT > | |
void | lockedLogTrace (std::basic_string< CharT > const &msg) |
Logs a trace message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | lockedLogTraceNoLF (std::basic_string< CharT > const &msg) |
Logs a trace message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logTrace (std::basic_string< CharT > const &msg) |
Logs a trace message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logTrace (std::basic_ostream< CharT > const &msg) |
Logs a trace message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | logTraceNoLF (std::basic_string< CharT > const &msg) |
Logs a trace message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logTraceNoLF (std::basic_ostream< CharT > const &msg) |
Logs a trace message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | lockedLogDebug (std::basic_string< CharT > const &msg) |
Logs a debug message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | lockedLogDebugNoLF (std::basic_string< CharT > const &msg) |
Logs a debug message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logDebug (std::basic_string< CharT > const &msg) |
Logs a debug message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logDebug (std::basic_ostream< CharT > const &msg) |
Logs a debug message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | logDebugNoLF (std::basic_string< CharT > const &msg) |
Logs a debug message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logDebugNoLF (std::basic_ostream< CharT > const &msg) |
Logs a debug message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | lockedLogInfo (std::basic_string< CharT > const &msg) |
Logs a message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | lockedLogInfoNoLF (std::basic_string< CharT > const &msg) |
Logs a message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logInfo (std::basic_string< CharT > const &msg) |
Logs a message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logInfo (std::basic_ostream< CharT > const &msg) |
Logs a message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | logInfoNoLF (std::basic_string< CharT > const &msg) |
Logs a message, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logInfoNoLF (std::basic_ostream< CharT > const &msg) |
Logs a message, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | lockedLogWarning (std::basic_string< CharT > const &msg) |
Logs a warning, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | lockedLogWarningNoLF (std::basic_string< CharT > const &msg) |
Logs a warning, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logWarning (std::basic_string< CharT > const &msg) |
Logs a warning, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logWarning (std::basic_ostream< CharT > const &msg) |
Logs a warning, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | logWarningNoLF (std::basic_string< CharT > const &msg) |
Logs a warning, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logWarningNoLF (std::basic_ostream< CharT > const &msg) |
Logs a warning, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | lockedLogError (std::basic_string< CharT > const &msg) |
Logs an error, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | lockedLogErrorNoLF (std::basic_string< CharT > const &msg) |
Logs an error, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logError (std::basic_string< CharT > const &msg) |
Logs an error, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logError (std::basic_ostream< CharT > const &msg) |
Logs an error, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | logErrorNoLF (std::basic_string< CharT > const &msg) |
Logs an error, from a std::basic_string< CharT > | |
template<typename CharT > | |
void | logErrorNoLF (std::basic_ostream< CharT > const &msg) |
Logs an error, from a std::basic_ostream< CharT > | |
template<typename CharT > | |
void | pushMessage (LogType type, std::basic_string< CharT > const &message, bool addLF=true) |
Pushes a message into the queue. | |
CU_API void | flushQueue () |
MbString | getHeader (uint8_t index) const noexcept |
void | lock () const |
void | unlock () const noexcept |
|
delete |
|
noexcept |
|
noexcept |
CU_API castor::LoggerInstance::LoggerInstance | ( | ProgramConsole & | console, |
LogType | logType ) |
sets the log file address.
[in] | console | The console where messages will output. |
[in] | logType | The log type. |
CU_API void castor::LoggerInstance::flushQueue | ( | ) |
|
inlinenoexcept |
|
inline |
|
inline |
Logs a debug message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eDebug, and castor::toUtf8().
Referenced by castor::DebugLoggerStreambufTraitsT< CharType >::log().
|
inline |
Logs a debug message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eDebug, and castor::toUtf8().
Referenced by castor::DebugLoggerStreambufTraitsT< CharType >::logNoLF().
|
inline |
Logs an error, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eError, and castor::toUtf8().
Referenced by castor::ErrorLoggerStreambufTraitsT< CharType >::log().
|
inline |
Logs an error, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eError, and castor::toUtf8().
Referenced by castor::ErrorLoggerStreambufTraitsT< CharType >::logNoLF().
|
inline |
Logs a message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eInfo, and castor::toUtf8().
Referenced by castor::InfoLoggerStreambufTraitsT< CharType >::log().
|
inline |
Logs a message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eInfo, and castor::toUtf8().
Referenced by castor::InfoLoggerStreambufTraitsT< CharType >::logNoLF().
|
inline |
Logs a trace message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eTrace, and castor::toUtf8().
Referenced by castor::TraceLoggerStreambufTraitsT< CharType >::log().
|
inline |
Logs a trace message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eTrace, and castor::toUtf8().
Referenced by castor::TraceLoggerStreambufTraitsT< CharType >::logNoLF().
|
inline |
Logs a warning, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eWarning, and castor::toUtf8().
Referenced by castor::WarningLoggerStreambufTraitsT< CharType >::log().
|
inline |
Logs a warning, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eWarning, and castor::toUtf8().
Referenced by castor::WarningLoggerStreambufTraitsT< CharType >::logNoLF().
|
inline |
Logs a debug message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logDebug().
|
inline |
Logs a debug message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eDebug, and pushMessage().
Referenced by logDebug().
|
inline |
Logs a debug message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logDebugNoLF().
|
inline |
Logs a debug message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eDebug, and pushMessage().
Referenced by logDebugNoLF().
|
inline |
Logs an error, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logError().
|
inline |
Logs an error, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eError, and pushMessage().
Referenced by logError().
|
inline |
Logs an error, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logErrorNoLF().
|
inline |
Logs an error, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eError, and pushMessage().
Referenced by logErrorNoLF().
|
inline |
Logs a message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logInfo().
|
inline |
Logs a message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eInfo, and pushMessage().
Referenced by logInfo().
|
inline |
Logs a message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logInfoNoLF().
|
inline |
Logs a message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eInfo, and pushMessage().
Referenced by logInfoNoLF().
|
inline |
Logs a trace message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logTrace().
|
inline |
Logs a trace message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eTrace, and pushMessage().
Referenced by logTrace(), castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::reportAdded(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::reportCreation().
|
inline |
Logs a trace message, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logTraceNoLF().
|
inline |
Logs a trace message, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eTrace, and pushMessage().
Referenced by logTraceNoLF().
|
inline |
Logs a warning, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logWarning().
|
inline |
Logs a warning, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eWarning, and pushMessage().
Referenced by logWarning(), castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::reportDuplicate(), castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::reportNull(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::reportUnknown().
|
inline |
Logs a warning, from a std::basic_ostream< CharT >
[in] | msg | The line to log |
References logWarningNoLF().
|
inline |
Logs a warning, from a std::basic_string< CharT >
[in] | msg | The line to log |
References castor::eWarning, and pushMessage().
Referenced by logWarningNoLF().
|
noexcept |
|
delete |
|
inline |
Pushes a message into the queue.
[in] | type | The message type. |
[in] | message | The message. |
[in] | addLF | Whether or not add a LF at the end. |
References lock(), castor::makeUniqueLock(), and castor::toUtf8().
Referenced by logDebug(), logDebugNoLF(), logError(), logErrorNoLF(), logInfo(), logInfoNoLF(), logTrace(), logTraceNoLF(), logWarning(), and logWarningNoLF().
CU_API void castor::LoggerInstance::registerCallback | ( | LogCallback const & | callback, |
void * | caller ) |
Registers the logging callback.
[in] | callback | The callback |
[in] | caller | Pointer to user data, used to identify the callback |
CU_API void castor::LoggerInstance::setFileName | ( | Path const & | logFilePath, |
LogType | logType = LogType::eCount ) |
sets the log file address
[in] | logFilePath | The log file path |
[in] | logType | The log type |
|
inlinenoexcept |
CU_API void castor::LoggerInstance::unregisterCallback | ( | void * | caller | ) |
Unregisters the logging callback.
[in] | caller | Pointer to user data |