The log manager handles the creation and retrieval of logs for the application.
More...
#include <OgreLogManager.h>
The log manager handles the creation and retrieval of logs for the application.
- By default, Root will instantiate a LogManager (which becomes the Singleton instance) on construction, and will create a default log based on the Root construction parameters. If you want more control, for example redirecting log output right from the start or suppressing debug output, you need to create a LogManager yourself before creating a Root instance, then create a default log. Root will detect that you've created one yourself and won't create one of its own, thus using all your logging preferences from the first instance.
◆ LogManager()
Ogre::LogManager::LogManager |
( |
| ) |
|
◆ ~LogManager()
Ogre::LogManager::~LogManager |
( |
| ) |
|
◆ createLog()
Log* Ogre::LogManager::createLog |
( |
const String & |
name, |
|
|
bool |
defaultLog = false , |
|
|
bool |
debuggerOutput = true , |
|
|
bool |
suppressFileOutput = false |
|
) |
| |
Creates a new log with the given name.
- Parameters
-
name | The name to give the log e.g. 'Ogre.log' |
defaultLog | If true, this is the default log output will be sent to if the generic logging methods on this class are used. The first log created is always the default log unless this parameter is set. |
debuggerOutput | If true, output to this log will also be routed to the debugger's output window. |
suppressFileOutput | If true, this is a logical rather than a physical log and no file output will be written. If you do this you should register a LogListener so log output is not lost. |
◆ destroyLog() [1/2]
void Ogre::LogManager::destroyLog |
( |
const String & |
name | ) |
|
Closes and removes a named log.
◆ destroyLog() [2/2]
void Ogre::LogManager::destroyLog |
( |
Log * |
log | ) |
|
Closes and removes a log.
◆ getDefaultLog()
Log* Ogre::LogManager::getDefaultLog |
( |
| ) |
|
Returns a pointer to the default log.
◆ getLog()
Log* Ogre::LogManager::getLog |
( |
const String & |
name | ) |
|
Retrieves a log managed by this class.
◆ getSingleton()
static LogManager& Ogre::LogManager::getSingleton |
( |
| ) |
|
|
static |
Override standard Singleton retrieval.
- This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.
◆ getSingletonPtr()
static LogManager* Ogre::LogManager::getSingletonPtr |
( |
| ) |
|
|
static |
Override standard Singleton retrieval.
- This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.
◆ logMessage() [1/2]
Log a message to the default log.
◆ logMessage() [2/2]
void Ogre::LogManager::logMessage |
( |
LogMessageLevel |
lml, |
|
|
const String & |
message, |
|
|
bool |
maskDebug = false |
|
) |
| |
|
inline |
Log a message to the default log (signature for backward compatibility).
◆ setDefaultLog()
Log* Ogre::LogManager::setDefaultLog |
( |
Log * |
newLog | ) |
|
Sets the passed in log as the default log.
- Returns
- The previous default log.
◆ setLogDetail()
Sets the level of detail of the default log.
◆ stream()
Get a stream on the default log.
◆ OGRE_AUTO_MUTEX
Ogre::LogManager::OGRE_AUTO_MUTEX |
The documentation for this class was generated from the following file: