Classes | Public Member Functions | Public Attributes | Protected Types | Protected Attributes | List of all members
Ogre::Log Class Reference

#include <OgreLog.h>

Inheritance diagram for Ogre::Log:
Inheritance graph
[legend]

Classes

class  Stream
 Stream object which targets a log. More...
 

Public Member Functions

 Log (const String &name, bool debugOutput=true, bool suppressFileOutput=false)
 
 ~Log ()
 
void addListener (LogListener *listener)
 
LoggingLevel getLogDetail () const
 Gets the level of the log detail. More...
 
const StringgetName () const
 Return the name of the log. More...
 
bool isDebugOutputEnabled () const
 Get whether debug output is enabled for this log. More...
 
bool isFileOutputSuppressed () const
 Get whether file output is suppressed for this log. More...
 
bool isTimeStampEnabled () const
 Get whether time stamps are printed for this log. More...
 
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>"),. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void removeListener (LogListener *listener)
 
void setDebugOutputEnabled (bool debugOutput)
 
void setLogDetail (LoggingLevel ll)
 
void setTimeStampEnabled (bool timeStamp)
 
Stream stream (LogMessageLevel lml=LML_NORMAL, bool maskDebug=false)
 Get a stream object targeting this log. More...
 

Public Attributes

 OGRE_AUTO_MUTEX
 

Protected Types

typedef vector< LogListener * >::type mtLogListener
 

Protected Attributes

bool mDebugOut
 
mtLogListener mListeners
 
std::ofstream mLog
 
LoggingLevel mLogLevel
 
String mLogName
 
bool mSuppressFile
 
bool mTimeStamp
 

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 103 of file OgreLog.h.

Member Typedef Documentation

◆ mtLogListener

typedef vector<LogListener*>::type Ogre::Log::mtLogListener
protected

Definition at line 113 of file OgreLog.h.

Constructor & Destructor Documentation

◆ Log()

Ogre::Log::Log ( const String name,
bool  debugOutput = true,
bool  suppressFileOutput = false 
)
Remarks
Usual constructor - called by LogManager.

◆ ~Log()

Ogre::Log::~Log ( )
Remarks
Default destructor.

Member Function Documentation

◆ addListener()

void Ogre::Log::addListener ( LogListener listener)
Remarks
Register a listener to this log
Parameters
listenerA valid listener derived class

◆ getLogDetail()

LoggingLevel Ogre::Log::getLogDetail ( ) const

Gets the level of the log detail.

Definition at line 166 of file OgreLog.h.

◆ getName()

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

Return the name of the log.

Definition at line 133 of file OgreLog.h.

◆ isDebugOutputEnabled()

bool Ogre::Log::isDebugOutputEnabled ( ) const

Get whether debug output is enabled for this log.

Definition at line 135 of file OgreLog.h.

◆ isFileOutputSuppressed()

bool Ogre::Log::isFileOutputSuppressed ( ) const

Get whether file output is suppressed for this log.

Definition at line 137 of file OgreLog.h.

◆ isTimeStampEnabled()

bool Ogre::Log::isTimeStampEnabled ( ) const

Get whether time stamps are printed for this log.

Definition at line 139 of file OgreLog.h.

◆ logMessage()

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>"),.

Referenced by Ogre::Log::Stream::~Stream(), and Ogre::Log::Stream::operator<<().

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [1/2]

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

Definition at line 113 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [2/2]

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

Definition at line 119 of file OgreMemoryAllocatedObject.h.

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

◆ operator new() [2/3]

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 68 of file OgreMemoryAllocatedObject.h.

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [1/2]

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

Definition at line 91 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [2/2]

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 86 of file OgreMemoryAllocatedObject.h.

◆ removeListener()

void Ogre::Log::removeListener ( LogListener listener)
Remarks
Unregister a listener from this log
Parameters
listenerA valid listener derived class

◆ setDebugOutputEnabled()

void Ogre::Log::setDebugOutputEnabled ( bool  debugOutput)
Remarks
Enable or disable outputting log messages to the debugger.

◆ setLogDetail()

void Ogre::Log::setLogDetail ( LoggingLevel  ll)
Remarks
Sets the level of the log detail.

◆ setTimeStampEnabled()

void Ogre::Log::setTimeStampEnabled ( bool  timeStamp)
Remarks
Enable or disable time stamps.

◆ stream()

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

Get a stream object targeting this log.

Member Data Documentation

◆ mDebugOut

bool Ogre::Log::mDebugOut
protected

Definition at line 108 of file OgreLog.h.

◆ mListeners

mtLogListener Ogre::Log::mListeners
protected

Definition at line 114 of file OgreLog.h.

◆ mLog

std::ofstream Ogre::Log::mLog
protected

Definition at line 106 of file OgreLog.h.

◆ mLogLevel

LoggingLevel Ogre::Log::mLogLevel
protected

Definition at line 107 of file OgreLog.h.

◆ mLogName

String Ogre::Log::mLogName
protected

Definition at line 111 of file OgreLog.h.

◆ mSuppressFile

bool Ogre::Log::mSuppressFile
protected

Definition at line 109 of file OgreLog.h.

◆ mTimeStamp

bool Ogre::Log::mTimeStamp
protected

Definition at line 110 of file OgreLog.h.

◆ OGRE_AUTO_MUTEX

Ogre::Log::OGRE_AUTO_MUTEX

Definition at line 119 of file OgreLog.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.