38 , mLogTimeProvider(nullptr)
53 return mInstances.insert(std::make_pair(name, osg::ref_ptr<Log>(log))).second;
64 return i->second.get();
72 Log* log = value.second.get();
82 Log* log = value.second.get();
Log class which the engine uses for all of its logging needs.
virtual unsigned GetFrameNumber()=0
Gets frame number.
OpenThreads::Mutex & GetMutex()
Returns the reference to an internal OpenThreads Mutex.
void LogMessageToConsole(const LogWriter::LogData &logData)
Write out a message to the screen console.
void LogHorizRule()
Writes out a horizontal line to the Log File.
Interface class get the time for the logger.
void LogMessageToFile(const LogWriter::LogData &logData)
Write out a message to the Log file.
Log * GetInstance(const std::string &name)
Retrieves a stored Log instance.
void SetLogLevel(LogLevel logLevel)
Sets the lowest level of logging that will be logged.
trUtil::HashMap< std::string, osg::ref_ptr< Log > > mInstances
bool AddInstance(const std::string &name, Log *log)
Stores a new Log instance in the manager.
A specialized LogWriter class that outputs Log messages to a file.
void SetLogTimeProvider(LogTimeProvider *ltp)
This sets a Log time source.
virtual const trUtil::DateTime & GetDateTime()=0
Gets date time.
bool IsLogTimeProviderValid() const
Check if the Log Time Provider is currently valid in this manager.
LogManager()
Default constructor.
OpenThreads::Mutex mMutex
LogTimeProvider * mLogTimeProvider
Specialized LogWriter used to display Log messages in the console window.
osg::ref_ptr< LogWriter > mLogWriterConsole
osg::ref_ptr< LogWriterFile > mLogWriterFile
writes to console
void SetOutputStreamBit(unsigned int option)
Tell the Log where to send output messages.
virtual osg::Referenced * AsReferenced()=0
Converts this object to a referenced.
void ReOpenFile()
Reopens the log file.
osg::observer_ptr< osg::Referenced > mLogTimeProviderAsRef
writes to file
void SetAllLogLevels(const LogLevel &newLevel)
Set the Log Level for all active Loggers.
unsigned int GetFrameNumber()
Returns the stored frame number.
const trUtil::DateTime & GetDateTime()
Returns the reference to the stored DateTime object.
void SetAllOutputStreamBits(unsigned int option)
Set the OutputStreamOptions bits for all stored Loggers The bits correspond to: NO_OUTPUT = 0x0000000...