Acts as an application-wide logging class. More...
Inherited by FileLogger.
Public Member Functions | |
| virtual | ~Logger () |
| Destructor. | |
Static Public Member Functions | |
| static void JUCE_CALLTYPE | setCurrentLogger (Logger *newLogger, bool deleteOldLogger=false) |
| Sets the current logging class to use. | |
| static void JUCE_CALLTYPE | writeToLog (const String &message) |
| Writes a string to the current logger. | |
| static void JUCE_CALLTYPE | outputDebugString (const String &text) |
| Writes a message to the standard error stream. | |
Protected Member Functions | |
| Logger () | |
| virtual void | logMessage (const String &message)=0 |
| This is overloaded by subclasses to implement custom logging behaviour. | |
Acts as an application-wide logging class.
A subclass of Logger can be created and passed into the Logger::setCurrentLogger method and this will then be used by all calls to writeToLog.
The logger class also contains methods for writing messages to the debugger's output stream.
| virtual Logger::~Logger | ( | ) | [virtual] |
Destructor.
| Logger::Logger | ( | ) | [protected] |
| static void JUCE_CALLTYPE Logger::setCurrentLogger | ( | Logger * | newLogger, |
| bool | deleteOldLogger = false |
||
| ) | [static] |
Sets the current logging class to use.
Note that the object passed in won't be deleted when no longer needed. A null pointer can be passed-in to disable any logging.
If deleteOldLogger is set to true, the existing logger will be deleted (if there is one).
| static void JUCE_CALLTYPE Logger::writeToLog | ( | const String & | message | ) | [static] |
Writes a string to the current logger.
This will pass the string to the logger's logMessage() method if a logger has been set.
| static void JUCE_CALLTYPE Logger::outputDebugString | ( | const String & | text | ) | [static] |
Writes a message to the standard error stream.
This can be called directly, or by using the DBG() macro in juce_PlatformDefs.h (which will avoid calling the method in non-debug builds).
| virtual void Logger::logMessage | ( | const String & | message | ) | [protected, pure virtual] |
This is overloaded by subclasses to implement custom logging behaviour.
Implemented in FileLogger.