The base class of all logger engines. More...
#include <AbstractLoggerEngine.h>
Public Slots | |
virtual void | finalize ()=0 |
Function which is called to finalize the logger engine. | |
virtual void | newMessages (const QString &engine_name, Logger::MessageType message_type, Logger::MessageContextFlags message_context, const QList< QVariant > &messages) |
Slot which is connected to the newMessage() signal of the Logger class. |
Public Member Functions | |
virtual void | clearLog () |
Clears the log currently hold by the logger engine. | |
virtual QString | description () const =0 |
Returns a description of the engine. | |
virtual void | enableAllMessageTypes () |
Enables all message types for this engine. | |
QString | formattingEngineName () |
Returns the name of the installed formatting engine. | |
Logger::MessageTypeFlags | getEnabledMessageTypes () const |
Returns the enabled message types for this engine. | |
AbstractFormattingEngine * | getInstalledFormattingEngine () |
Returns a reference to the formatting engine used by this engine. | |
virtual bool | initialize ()=0 |
Function which is called to initialize the logger engine. | |
void | installFormattingEngine (AbstractFormattingEngine *engine) |
Installs a formatting engine which needs to be used by this engine. | |
bool | isActive () const |
Indicates if the engine is active. | |
virtual bool | isFormattingEngineConstant () const =0 |
Indicates if the formatting engine and/or the message contexts can be changed by the user at runtime. | |
bool | isInitialized () const |
Returns true if the engine is initialized. | |
virtual void | logMessage (const QString &message, Logger::MessageType message_type=Logger::Info)=0 |
Function which receives a formatted string which needs to be logged. | |
Logger::MessageContextFlags | messageContexts () const |
Returns the logging contexts for which this engine accepts messages. | |
QString | name () const |
Returns the name of the engine. | |
virtual bool | removable () const |
Gets if the user can remove this engine. | |
void | setActive (bool is_active) |
Sets the activity of the engine. | |
virtual void | setEnabledMessageTypes (Logger::MessageTypeFlags message_types) |
Sets the enabled message types for this engine. | |
void | setMessageContexts (Logger::MessageContextFlags message_contexts) |
Sets the logging contexts for which this engine accepts messages. | |
void | setName (const QString &name) |
Sets the name of the engine. | |
virtual void | setRemovable (bool is_removable) |
Sets if the user can remove this engine. | |
virtual QString | status () const =0 |
Returns a status message for the engine. |
The base class of all logger engines.
|
inlinevirtual |
Clears the log currently hold by the logger engine.
Reimplemented in Qtilities::CoreGui::WidgetLoggerEngine, and Qtilities::Logging::FileLoggerEngine.
|
pure virtual |
Function which receives a formatted string which needs to be logged.
Messages arrives at logger engines through the newMessages() slot which will format the messages and validate if they must be logged. If so, this function will be called with a formatted message. If you wish to handle the message formatting manually, you can reimplement the newMessages() function.
Implemented in Qtilities::Logging::ConsoleLoggerEngine, Qtilities::Logging::QtMsgLoggerEngine, Qtilities::CoreGui::WidgetLoggerEngine, and Qtilities::Logging::FileLoggerEngine.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|