OGRE: Ogre::Log Class Reference - OGRE Documentation

# Ogre::Log Class Reference

`#include <OgreLog.h>`

Inheritance diagram for Ogre::Log:

[legend]

List of all members.

## Public Member Functions
OGRE_AUTO_MUTEX | Log (const String &name, bool debugOutput=true, bool suppressFileOutput=false)
| ~Log ()
const String & | getName () const
| Return the name of the log.
bool | isDebugOutputEnabled () const
| Get whether debug output is enabled for this log.
bool | isFileOutputSuppressed () const
| Get whether file output is suppressed for this log.
void | logMessage (const String &message, LogMessageLevel lml=LML_NORMAL, bool maskDebug=false)
| Log a message to the debugger and to log file (the default is "<code>OGRE.log</code>"),.
Stream | stream (LogMessageLevel lml=LML_NORMAL, bool maskDebug=false)
| Get a stream object targetting this log.
void | setDebugOutputEnabled (bool debugOutput)
void | setLogDetail (LoggingLevel ll)
LoggingLevel | getLogDetail () const
| Gets the level of the log detail.
void | addListener (LogListener *listener)
void | removeListener (LogListener *listener)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
## Protected Types
typedef std::vector < LogListener * > | mtLogListener
## Protected Attributes
std::ofstream | mfpLog
LoggingLevel | mLogLevel
bool | mDebugOut
bool | mSuppressFile
String | mLogName
mtLogListener | mListeners
## Classes
class | Stream
| Stream object which targets a log. More...

## Detailed Description

Remarks:
  Log class for writing debug/log data to files.

Note:
  Should not be used directly, but trough the LogManager class.

Definition at line 87 of file OgreLog.h.

## Member Typedef Documentation

typedef std::vector<LogListener*> Ogre::Log::mtLogListener`[protected]`

Definition at line 96 of file OgreLog.h.

## Constructor & Destructor Documentation

OGRE_AUTO_MUTEX Ogre::Log::Log | ( | const String & | name,
|  | bool | debugOutput = `true`,
|  | bool | suppressFileOutput = `false` |
| ) |  |  |

Remarks:
  Usual constructor - called by LogManager.

Ogre::Log::~Log | ( |  | ) |

Remarks:
  Default destructor.

## Member Function Documentation

const String& Ogre::Log::getName | ( |  | ) | const

Return the name of the log.

Definition at line 117 of file OgreLog.h.

bool Ogre::Log::isDebugOutputEnabled | ( |  | ) | const

Get whether debug output is enabled for this log.

Definition at line 119 of file OgreLog.h.

bool Ogre::Log::isFileOutputSuppressed | ( |  | ) | const

Get whether file output is suppressed for this log.

Definition at line 121 of file OgreLog.h.

void Ogre::Log::logMessage | ( | const String & | message,
|  | LogMessageLevel | lml = `LML_NORMAL`,
|  | bool | maskDebug = `false` |
| ) |  |  |

Log a message to the debugger and to log file (the default is "<code>OGRE.log</code>"),.

Stream Ogre::Log::stream | ( | LogMessageLevel | lml = `LML_NORMAL`,
|  | bool | maskDebug = `false` |
| ) |  |  |

Get a stream object targetting this log.

void Ogre::Log::setDebugOutputEnabled | ( | bool | debugOutput | ) |

Remarks:
  Enable or disable outputting log messages to the debugger.

void Ogre::Log::setLogDetail | ( | LoggingLevel | ll | ) |

Remarks:
  Sets the level of the log detail.

LoggingLevel Ogre::Log::getLogDetail | ( |  | ) | const

Gets the level of the log detail.

Definition at line 143 of file OgreLog.h.

void Ogre::Log::addListener | ( | LogListener * | listener | ) |

Remarks:
  Register a listener to this log

Parameters:

  | A | valid listener derived class

void Ogre::Log::removeListener | ( | LogListener * | listener | ) |

Remarks:
  Unregister a listener from this log

Parameters:

  | A | valid listener derived class

template<class Alloc>

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

operator new, with debug line info

Definition at line 62 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr |
| ) |  |  | `[inherited]`

placement operator new

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

array operator new, with debug line info

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 84 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 89 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |  |
| ) |  |  | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 106 of file OgreMemoryAllocatedObject.h.

template<class Alloc>

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

## Member Data Documentation

std::ofstream Ogre::Log::mfpLog`[protected]`

Definition at line 90 of file OgreLog.h.

LoggingLevel Ogre::Log::mLogLevel`[protected]`

Definition at line 91 of file OgreLog.h.

bool Ogre::Log::mDebugOut`[protected]`

Definition at line 92 of file OgreLog.h.

bool Ogre::Log::mSuppressFile`[protected]`

Definition at line 93 of file OgreLog.h.

String Ogre::Log::mLogName`[protected]`

Definition at line 94 of file OgreLog.h.

mtLogListener Ogre::Log::mListeners`[protected]`

Definition at line 97 of file OgreLog.h.

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

- OgreLog.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 26 11:33:49 2009