Static Public Member Functions | Private Types | Static Private Attributes | List of all members
rviz::OgreLogging Class Reference

Convenience interface to Ogre logging. More...

#include <ogre_logging.h>

Static Public Member Functions

static void configureLogging ()
 Configure the Ogre::LogManager to give the currently selected behavior. This must be called before Ogre::Root is instantiated! More...
 
static void noLog ()
 Disable Ogre logging entirely. This is the default. More...
 
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, it will be relative to the directory which is current when the program is run. Default is "Ogre.log". More...
 
static void useRosLog ()
 Configure Ogre to write output to the ROS logger. More...
 

Private Types

enum  Preference { StandardOut, FileLogging, NoLogging }
 

Static Private Attributes

static QString filename_
 
static Preference preference_ = OgreLogging::NoLogging
 

Detailed Description

Convenience interface to Ogre logging.

This all-static class wraps Ogre::LogManager into 3 easy options: no logging, standard out, or file logging. The option-selection calls (useStandardOut(), useLogFile(), and noLog() must be called before configureLogging(). configureLogging(), in turn, must be called before any Ogre::Root object is instantiated. configureLogging() is called at the right time by the RenderSystem constructor, so you generally won't need to call it explicitly.

Definition at line 45 of file ogre_logging.h.

Member Enumeration Documentation

◆ Preference

Enumerator
StandardOut 
FileLogging 
NoLogging 

Definition at line 66 of file ogre_logging.h.

Member Function Documentation

◆ configureLogging()

void rviz::OgreLogging::configureLogging ( )
static

Configure the Ogre::LogManager to give the currently selected behavior. This must be called before Ogre::Root is instantiated!

Configure the Ogre::LogManager to give the behavior selected by the most recent call to enableStandardOut(), setLogFile(), or disable(). This must be called before Ogre::Root is instantiated! Called inside RenderSystem constructor.

Definition at line 107 of file ogre_logging.cpp.

◆ noLog()

void rviz::OgreLogging::noLog ( )
static

Disable Ogre logging entirely. This is the default.

Definition at line 97 of file ogre_logging.cpp.

◆ useLogFile()

void rviz::OgreLogging::useLogFile ( const QString &  filename = "Ogre.log")
static

Configure Ogre to write output to the given log file name. If file name is a relative path, it will be relative to the directory which is current when the program is run. Default is "Ogre.log".

Definition at line 90 of file ogre_logging.cpp.

◆ useRosLog()

void rviz::OgreLogging::useRosLog ( )
static

Configure Ogre to write output to the ROS logger.

Configure Ogre to write output to standard out.

Definition at line 81 of file ogre_logging.cpp.

Member Data Documentation

◆ filename_

QString rviz::OgreLogging::filename_
staticprivate

Definition at line 73 of file ogre_logging.h.

◆ preference_

OgreLogging::Preference rviz::OgreLogging::preference_ = OgreLogging::NoLogging
staticprivate

Definition at line 72 of file ogre_logging.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Mon Jun 6 2022 02:06:35