Envision
A visual programming IDE for object-oriented languages
|
The Log interface includes functionality for recording system events. More...
Classes | |
struct | LogEntry |
The information of each entry in the log. More... | |
Public Types | |
enum | Level { LOGDEBUG , LOGERROR , LOGWARNING , LOGINFO } |
The log levels to which each message can belong. More... | |
Signals | |
void | newLogEntry () |
Emitted when a new log entry (or several) have been added to the log. More... | |
Public Member Functions | |
virtual | ~Log () |
virtual void | add (Level level, QString message)=0 |
Adds a new message with the specified level to the log. More... | |
virtual void | add (QString message)=0 |
Adds a new message with LOGINFO level to the log. More... | |
void | debug (const QString &message) |
A convenience function that logs a new debug message to the log. More... | |
void | error (const QString &message) |
A convenience function that adds a new error message to the log. More... | |
virtual LogEntry | getNextEntry ()=0 |
Returns the next unread message in the log queue. More... | |
virtual QList< LogEntry > | getUnreadEntries ()=0 |
Returns a list of all unread messages in the log. More... | |
virtual bool | hasUnreadEntries ()=0 |
Returns true if there are unread messages in the log. More... | |
void | info (const QString &message) |
A convenience function that adds a new info message to the log. More... | |
void | warning (const QString &message) |
A convenience function that adds a new warning message to the log. More... | |
Static Public Member Functions | |
static Log * | getLogger (QString requestingPluginId) |
Returns an instance of the default logger that will be used to log events for the specified plugin. More... | |
The Log interface includes functionality for recording system events.
enum Logger::Log::Level |
|
virtual |
|
pure virtual |
Adds a new message with the specified level to the log.
The plug-in id that will be associated with the message is determined by the Log object instance.
level | The log level of the message |
message | The message to add |
Implemented in Logger::DefaultLog.
|
pure virtual |
Adds a new message with LOGINFO level to the log.
The plug-in id that will be associated with the message is determined by the Log object instance.
message | The message to add |
Implemented in Logger::DefaultLog.
|
inline |
A convenience function that logs a new debug message to the log.
|
inline |
A convenience function that adds a new error message to the log.
|
static |
Returns an instance of the default logger that will be used to log events for the specified plugin.
requestingPluginId | The plug-in id that will be used when adding new messages to the log. |
|
pure virtual |
Returns the next unread message in the log queue.
This also advances the pointer of the last read message by one.
If there are no unread entries, returns an empty (default) LogEntry.
Implemented in Logger::DefaultLog.
|
pure virtual |
Returns a list of all unread messages in the log.
If there are no unread messages the list is empty.
Implemented in Logger::DefaultLog.
|
pure virtual |
Returns true if there are unread messages in the log.
Implemented in Logger::DefaultLog.
|
inline |
A convenience function that adds a new info message to the log.
|
signal |
Emitted when a new log entry (or several) have been added to the log.
|
inline |
A convenience function that adds a new warning message to the log.