Go to the documentation of this file.
46 #ifndef INCLUDED_AI_LOGGER_H
47 #define INCLUDED_AI_LOGGER_H
57 #define MAX_LOG_MESSAGE_LENGTH 1024u
66 :
public Intern::AllocateFromAssimpHeap
105 void debug(
const std::string &message);
111 void verboseDebug(
const std::string &message);
116 void info(
const char* message);
117 void info(
const std::string &message);
122 void warn(
const char* message);
123 void warn(
const std::string &message);
129 void error(
const std::string &message);
153 unsigned int severity = Debugging | Err | Warn | Info) = 0;
165 unsigned int severity = Debugging | Err | Warn | Info) = 0;
186 virtual
void OnDebug(const
char* message)= 0;
196 virtual
void OnVerboseDebug(const
char *message) = 0;
206 virtual
void OnInfo(const
char* message) = 0;
216 virtual
void OnWarn(const
char* essage) = 0;
226 virtual
void OnError(const
char* message) = 0;
236 : m_Severity(NORMAL) {
251 : m_Severity(severity) {
259 m_Severity = log_severity;
272 return debug(message.c_str());
283 return error(message.c_str());
289 return warn(message.c_str());
295 return info(message.c_str());
301 #define ASSIMP_LOG_WARN_F(string, ...) \
302 Assimp::DefaultLogger::get()->warn((Assimp::Formatter::format(string), __VA_ARGS__))
304 #define ASSIMP_LOG_ERROR_F(string, ...) \
305 Assimp::DefaultLogger::get()->error((Assimp::Formatter::format(string), __VA_ARGS__))
307 #define ASSIMP_LOG_DEBUG_F(string, ...) \
308 Assimp::DefaultLogger::get()->debug((Assimp::Formatter::format(string), __VA_ARGS__))
310 #define ASSIMP_LOG_VERBOSE_DEBUG_F(string, ...) \
311 Assimp::DefaultLogger::get()->verboseDebug((Assimp::Formatter::format(string), __VA_ARGS__))
313 #define ASSIMP_LOG_INFO_F(string, ...) \
314 Assimp::DefaultLogger::get()->info((Assimp::Formatter::format(string), __VA_ARGS__))
316 #define ASSIMP_LOG_WARN(string) \
317 Assimp::DefaultLogger::get()->warn(string)
319 #define ASSIMP_LOG_ERROR(string) \
320 Assimp::DefaultLogger::get()->error(string)
322 #define ASSIMP_LOG_DEBUG(string) \
323 Assimp::DefaultLogger::get()->debug(string)
325 #define ASSIMP_LOG_VERBOSE_DEBUG(string) \
326 Assimp::DefaultLogger::get()->verboseDebug(string)
328 #define ASSIMP_LOG_INFO(string) \
329 Assimp::DefaultLogger::get()->info(string)
331 #endif // !! INCLUDED_AI_LOGGER_H
LogSeverity
Log severity to describe the granularity of logging.
Definition: Logger.hpp:75
Logger() AI_NO_EXCEPT
Definition: Logger.hpp:235
ErrorSeverity
Description for severity of a log message.
Definition: Logger.hpp:89
void info(const char *message)
Writes a info message.
virtual bool detachStream(LogStream *pStream, unsigned int severity=Debugging|Err|Warn|Info)=0
Detach a still attached stream from the logger (or modify the filter flags bits)
CPP-API: Abstract interface for logger implementations. Assimp provides a default implementation and ...
Definition: Logger.hpp:68
@ DEBUG
Debug messages will be logged, but not verbose debug messages.
Definition: Logger.hpp:77
void debug(const char *message)
Writes a debug message.
void setLogSeverity(LogSeverity log_severity)
Set a new log severity.
Definition: Logger.hpp:258
@ NORMAL
Normal granularity of logging.
Definition: Logger.hpp:76
CPP-API: Abstract interface for log stream implementations.
Definition: LogStream.hpp:65
void warn(const char *message)
Writes a warning message.
LogSeverity getLogSeverity() const
Get the current log severity.
Definition: Logger.hpp:265
void error(const char *message)
Writes an error message.
virtual bool attachStream(LogStream *pStream, unsigned int severity=Debugging|Err|Warn|Info)=0
Attach a new log-stream.
void verboseDebug(const char *message)
Writes a debug message.
Definition: ai_assert.h:50
virtual ~Logger()
Virtual destructor.
Definition: Logger.hpp:243