FEATURE: Add default logger with file- and win32 debuglogging
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@3 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
59
code/Win32DebugLogStream.h
Normal file
59
code/Win32DebugLogStream.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
|
||||
#define AI_WIN32DEBUGLOGSTREAM_H_INC
|
||||
|
||||
#include "LogStream.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "Windows.h"
|
||||
#endif
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** @class Win32DebugLogStream
|
||||
* @brief Logs into the debug stream from win32.
|
||||
*/
|
||||
class Win32DebugLogStream :
|
||||
public LogStream
|
||||
{
|
||||
public:
|
||||
/** @brief Default constructor */
|
||||
Win32DebugLogStream();
|
||||
|
||||
/** @brief Destructor */
|
||||
~Win32DebugLogStream();
|
||||
|
||||
/** @brief Writer */
|
||||
void write(const std::string &messgae);
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Default constructor
|
||||
inline Win32DebugLogStream::Win32DebugLogStream()
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Default constructor
|
||||
inline Win32DebugLogStream::~Win32DebugLogStream()
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Write method
|
||||
inline void Win32DebugLogStream::write(const std::string &message)
|
||||
{
|
||||
OutputDebugString( message.c_str() );
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
} // Namespace Assimp
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user