Assimp
v3.1.1 (June 2014)
|
Assimp::Logger Class Referenceabstract
CPP-API: Abstract interface for logger implementations.
More...
Inherits AllocateFromAssimpHeap.
Inherited by Assimp::DefaultLogger, and Assimp::NullLogger.
Protected Member Functions |
| Logger () |
| Default constructor. More...
|
|
| Logger (LogSeverity severity) |
| Construction with a given log severity. More...
|
|
virtual void | OnDebug (const char *message)=0 |
| Called as a request to write a specific debug message. More...
|
|
virtual void | OnError (const char *message)=0 |
| Called as a request to write a specific error message. More...
|
|
virtual void | OnInfo (const char *message)=0 |
| Called as a request to write a specific info message. More...
|
|
virtual void | OnWarn (const char *essage)=0 |
| Called as a request to write a specific warn message. More...
|
|
Detailed Description
CPP-API: Abstract interface for logger implementations.
Assimp provides a default implementation and uses it for almost all logging stuff ('DefaultLogger'). This class defines just basic logging behaviour and is not of interest for you. Instead, take a look at #DefaultLogger.
Member Enumeration Documentation
Description for severity of a log message.
Every LogStream has a bitwise combination of these flags. A LogStream doesn't receive any messages of a specific type if it doesn't specify the corresponding ErrorSeverity flag.
Enumerator |
---|
Debugging |
Debug log message.
|
Info |
Info log message.
|
Warn |
Warn log message.
|
Err |
Error log message.
|
Log severity to describe the granularity of logging.
Enumerator |
---|
NORMAL |
Normal granularity of logging.
|
VERBOSE |
Debug infos will be logged, too.
|
Constructor & Destructor Documentation
Assimp::Logger::~Logger |
( |
| ) |
|
|
inlinevirtual |
Assimp::Logger::Logger |
( |
| ) |
|
|
inlineprotected |
Construction with a given log severity.
Member Function Documentation
Attach a new log-stream.
The logger takes ownership of the stream and is responsible for its destruction (which is done using ::delete when the logger itself is destroyed). Call detachStream to detach a stream and to gain ownership of it again.
- Parameters
-
pStream | Log-stream to attach |
severity | Message filter, specified which types of log messages are dispatched to the stream. Provide a bitwise combination of the ErrorSeverity flags. |
- Returns
- true if the stream has been attached, false otherwise.
Implemented in Assimp::DefaultLogger, and Assimp::NullLogger.
void Assimp::Logger::debug |
( |
const char * |
message | ) |
|
Writes a debug message.
- Parameters
-
void Assimp::Logger::debug |
( |
const std::string & |
message | ) |
|
|
inline |
Detach a still attached stream from the logger (or modify the filter flags bits)
- Parameters
-
pStream | Log-stream instance for detaching |
severity | Provide a bitwise combination of the ErrorSeverity flags. This value is &~ed with the current flags of the stream, if the result is 0 the stream is detached from the Logger and the caller retakes the possession of the stream. |
- Returns
- true if the stream has been detached, false otherwise.
Implemented in Assimp::DefaultLogger, and Assimp::NullLogger.
void Assimp::Logger::error |
( |
const char * |
message | ) |
|
Writes an error message.
- Parameters
-
void Assimp::Logger::error |
( |
const std::string & |
message | ) |
|
|
inline |
Get the current log severity.
void Assimp::Logger::info |
( |
const char * |
message | ) |
|
Writes a info message.
- Parameters
-
void Assimp::Logger::info |
( |
const std::string & |
message | ) |
|
|
inline |
virtual void Assimp::Logger::OnDebug |
( |
const char * |
message | ) |
|
|
protectedpure virtual |
Called as a request to write a specific debug message.
- Parameters
-
message | Debug message. Never longer than MAX_LOG_MESSAGE_LENGTH characters (excluding the '0'). |
- Note
- The message string is only valid until the scope of the function is left.
Implemented in Assimp::NullLogger.
virtual void Assimp::Logger::OnError |
( |
const char * |
message | ) |
|
|
protectedpure virtual |
Called as a request to write a specific error message.
- Parameters
-
message | Error message. Never longer than MAX_LOG_MESSAGE_LENGTH characters (exluding the '0'). |
- Note
- The message string is only valid until the scope of the function is left.
Implemented in Assimp::NullLogger.
virtual void Assimp::Logger::OnInfo |
( |
const char * |
message | ) |
|
|
protectedpure virtual |
Called as a request to write a specific info message.
- Parameters
-
message | Info message. Never longer than MAX_LOG_MESSAGE_LENGTH characters (ecxluding the '0'). |
- Note
- The message string is only valid until the scope of the function is left.
Implemented in Assimp::NullLogger.
virtual void Assimp::Logger::OnWarn |
( |
const char * |
essage | ) |
|
|
protectedpure virtual |
Called as a request to write a specific warn message.
- Parameters
-
message | Warn message. Never longer than MAX_LOG_MESSAGE_LENGTH characters (exluding the '0'). |
- Note
- The message string is only valid until the scope of the function is left.
Implemented in Assimp::NullLogger.
void Assimp::Logger::setLogSeverity |
( |
LogSeverity |
log_severity | ) |
|
|
inline |
Set a new log severity.
- Parameters
-
log_severity | New severity for logging |
void Assimp::Logger::warn |
( |
const char * |
message | ) |
|
Writes a warning message.
- Parameters
-
void Assimp::Logger::warn |
( |
const std::string & |
message | ) |
|
|
inline |
Member Data Documentation
The documentation for this class was generated from the following file: