OgreLogManager.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __LogManager_H__
30 #define __LogManager_H__
31 
32 #include "OgrePrerequisites.h"
33 
34 #include "OgreLog.h"
35 #include "OgreSingleton.h"
36 #include "OgreString.h"
37 #include "OgreHeaderPrefix.h"
38 
39 namespace Ogre
40 {
65  class _OgreExport LogManager : public Singleton<LogManager>, public LogAlloc
66  {
67  protected:
69 
72 
75 
76  public:
77  OGRE_AUTO_MUTEX; // public to allow external locking
78 
81 
98  Log* createLog( const String& name, bool defaultLog = false, bool debuggerOutput = true,
99  bool suppressFileOutput = false);
100 
103  Log* getLog( const String& name);
104 
108 
110  void destroyLog(const String& name);
112  void destroyLog(Log* log);
113 
117  Log* setDefaultLog(Log* newLog);
118 
121  void logMessage( const String& message, LogMessageLevel lml = LML_NORMAL,
122  bool maskDebug = false);
123 
126  void logMessage( LogMessageLevel lml, const String& message,
127  bool maskDebug = false) { logMessage(message, lml, maskDebug); }
128 
131  bool maskDebug = false);
132 
151  static LogManager& getSingleton(void);
168 
169  };
170 
171 
174 }
175 
176 #include "OgreHeaderSuffix.h"
177 
178 #endif
OgreHeaderSuffix.h
Ogre::LogManager::~LogManager
~LogManager()
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::LogManager::OGRE_AUTO_MUTEX
OGRE_AUTO_MUTEX
Definition: OgreLogManager.h:77
Ogre::map
Definition: OgrePrerequisites.h:534
OgreSingleton.h
Ogre::LogMessageLevel
LogMessageLevel
The importance of a logged message.
Definition: OgreLog.h:67
Ogre::LogManager::destroyLog
void destroyLog(Log *log)
Closes and removes a log.
Ogre::LogManager::mLogs
LogList mLogs
A list of all the logs the manager can access.
Definition: OgreLogManager.h:71
Ogre::LogManager::getSingletonPtr
static LogManager * getSingletonPtr(void)
Override standard Singleton retrieval.
Ogre::LoggingLevel
LoggingLevel
The level of detail to which the log will go into.
Definition: OgreLog.h:58
Ogre::LogManager::setDefaultLog
Log * setDefaultLog(Log *newLog)
Sets the passed in log as the default log.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::LogManager::mDefaultLog
Log * mDefaultLog
The default log to which output is done.
Definition: OgreLogManager.h:74
Ogre::LogManager::logMessage
void logMessage(LogMessageLevel lml, const String &message, bool maskDebug=false)
Log a message to the default log (signature for backward compatibility).
Definition: OgreLogManager.h:126
Ogre::LogManager::getLog
Log * getLog(const String &name)
Retrieves a log managed by this class.
Ogre::LogManager::createLog
Log * createLog(const String &name, bool defaultLog=false, bool debuggerOutput=true, bool suppressFileOutput=false)
Creates a new log with the given name.
OgreHeaderPrefix.h
OgrePrerequisites.h
Ogre::LogManager::logMessage
void logMessage(const String &message, LogMessageLevel lml=LML_NORMAL, bool maskDebug=false)
Log a message to the default log.
Ogre::LogManager::getDefaultLog
Log * getDefaultLog()
Returns a pointer to the default log.
OgreLog.h
Ogre::Singleton
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:65
Ogre::LogManager::LogList
map< String, Log * >::type LogList
Definition: OgreLogManager.h:68
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Log
Definition: OgreLog.h:104
Ogre::LogManager::setLogDetail
void setLogDetail(LoggingLevel ll)
Sets the level of detail of the default log.
Ogre::LML_NORMAL
@ LML_NORMAL
Definition: OgreLog.h:69
Ogre::LogManager::stream
Log::Stream stream(LogMessageLevel lml=LML_NORMAL, bool maskDebug=false)
Get a stream on the default log.
Ogre::LogManager::getSingleton
static LogManager & getSingleton(void)
Override standard Singleton retrieval.
Ogre::LogManager::LogManager
LogManager()
OgreString.h
Ogre::Log::Stream
Stream object which targets a log.
Definition: OgreLog.h:202
Ogre::LogManager
The log manager handles the creation and retrieval of logs for the application.
Definition: OgreLogManager.h:66
Ogre::LogManager::destroyLog
void destroyLog(const String &name)
Closes and removes a named log.

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