30 #include <OgreLogManager.h> 46 #if OGRE_VERSION >= ((1 << 16) | (8 << 8)) 47 virtual void messageLogged(
const Ogre::String& message, Ogre::LogMessageLevel lml,
bool maskDebug,
const Ogre::String &logName,
bool& skipThisMessage )
49 if ( !skipThisMessage )
58 virtual void messageLogged(
const Ogre::String& message, Ogre::LogMessageLevel lml,
bool maskDebug,
const Ogre::String &logName )
75 preference_ = StandardOut;
84 preference_ = FileLogging;
91 preference_ = NoLogging;
102 Ogre::LogManager* log_manager = Ogre::LogManager::getSingletonPtr();
103 if( log_manager ==
NULL )
105 log_manager =
new Ogre::LogManager();
107 Ogre::Log* l = log_manager->createLog( filename_.toStdString(),
false,
false, preference_==NoLogging );
108 l->addListener( &ll );
111 if( preference_ == StandardOut )
static void configureLogging()
Configure the Ogre::LogManager to give the currently selected behavior. This must be called before Og...
virtual ~RosLogListener()
static void noLog()
Disable Ogre logging entirely. This is the default.
static void useLogFile(const QString &filename="Ogre.log")
Configure Ogre to write output to the given log file name. If file name is a relative path...
#define ROS_LOG(level, name,...)
virtual void messageLogged(const Ogre::String &message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String &logName)
#define ROSCONSOLE_DEFAULT_NAME
static Preference preference_
static void useRosLog()
Configure Ogre to write output to the ROS logger.
Ogre::LogMessageLevel min_lml