46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef _LOGGINGLOBAL_H
|
|
#define _LOGGINGLOBAL_H
|
|
|
|
namespace Engine {
|
|
|
|
enum LogLevel {
|
|
LogLevelDebug = 0,
|
|
LogLevelWarning,
|
|
LogLevelMessage,
|
|
LogLevelError
|
|
};
|
|
|
|
/** \brief Represents a log message along with its level
|
|
*/
|
|
struct LogEntry {
|
|
LogEntry (LogLevel level, const char* message) {
|
|
mLevel = level;
|
|
mMessage = message;
|
|
}
|
|
|
|
/** \brief the level of the message */
|
|
LogLevel mLevel;
|
|
/** \brief the message itself */
|
|
const char *mMessage;
|
|
};
|
|
|
|
/* Global visible functions */
|
|
|
|
/** \brief Sets the level for which messages should be printed out */
|
|
void SetLogPrintLevel (LogLevel print_level);
|
|
|
|
/** \brief Sends the Message to the Logging system */
|
|
void LogError (const char* str, ...);
|
|
/** \brief Sends the Message to the Logging system */
|
|
void LogWarning (const char* str, ...);
|
|
/** \brief Sends the Message to the Logging system */
|
|
void LogMessage (const char* str, ...);
|
|
/** \brief Sends the Message to the Logging system */
|
|
void LogDebug (const char* str, ...);
|
|
/** \brief Returns the last LogEntry sent to the Logging system */
|
|
const LogEntry &GetLastLogEntry ();
|
|
|
|
}
|
|
|
|
#endif // _LOGGINGLOBAL_H
|