Print
#include "AndroidLogListener.h"
 
#include <android/log.h>
 
#define  LOG_TAG    "ogre"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
 
using namespace Ogre;
 
AndroidLogListener::AndroidLogListener()
{
}
 
void AndroidLogListener::messageLogged(const String& message, LogMessageLevel lml, bool maskDebug, const String &logName)
{
	if(lml < Ogre::LML_CRITICAL)
	{
		LOGI(message.c_str());
	}
	else
	{
		LOGE(message.c_str());
	}
}

 


Contributors to this page: jacmoe133512 points  .
Page last modified on Thursday 13 of May, 2010 14:52:02 UTC by jacmoe133512 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.