#include <MessageLogMgr.h>

Public Member Functions | |
| virtual void | setPath (const std::string &path)=0 |
| virtual MessageLog * | createLog (const std::string &logName)=0 |
| virtual MessageLog * | getLog (const std::string &logName) const =0 |
| virtual MessageLog * | getLog () const =0 |
| virtual std::vector< MessageLog * > | getLogs () const =0 |
Static Public Member Functions | |
| static const std::string & | signalLogPathChanged () |
| static const std::string & | signalLogAdded () |
| static const std::string & | signalLogRemoved () |
Protected Member Functions | |
| virtual | ~MessageLogMgr () |
One technique of reporting messages to users is to generate a log file based on various processing events. This capability exists in the form of message logs that are maintained by the MessageLogMgr. Message logs are created according to a unique name, and there is no limit to the number of message logs for a session. All message logs are saved in a file on disk in a common message log directory set that is initially specified in the user options.
The MessageLogMgr class maintains the creation and management of each log and provides an interface to add a message to a single log.
A default log is automatically created for each user session. All messages with the reporting level of SILENT are also written to the session log. The session log has the filename "username_session.log", where "username" is the username of the person currently logged into the system.
This subclass of Subject will notify upon the following conditions:
Definition at line 50 of file MessageLogMgr.h.
| virtual MessageLogMgr::~MessageLogMgr | ( | ) | [protected, virtual] |
This will be cleaned up during application close.
Plug-ins do not need to destroy it.
Definition at line 133 of file MessageLogMgr.h.
| static const std::string& MessageLogMgr::signalLogPathChanged | ( | ) | [static] |
Emitted when the message log path changes with boost::any<std::string> containing the new path.
Definition at line 57 of file MessageLogMgr.h.
| static const std::string& MessageLogMgr::signalLogAdded | ( | ) | [static] |
Emitted when a new log is created by calling createLog() with boost::any<MessageLog*> containing a pointer to the created log.
Definition at line 64 of file MessageLogMgr.h.
| static const std::string& MessageLogMgr::signalLogRemoved | ( | ) | [static] |
Emitted when a log is removed while closing a session with boost::any<MessageLog*> containing a pointer to the removed log.
Definition at line 71 of file MessageLogMgr.h.
| virtual void MessageLogMgr::setPath | ( | const std::string & | path | ) | [pure virtual] |
Sets a new path for message logs.
This method sets a new directory to which all message logs are written. This should not normally be called, since the message log path is set by the user options.
| path | The new message log path. |
| virtual MessageLog* MessageLogMgr::createLog | ( | const std::string & | logName | ) | [pure virtual] |
Creates a new log with a given name.
| logName | The name of the new log to create. |
NULL pointer is returned if a log with the given name already exists.| virtual MessageLog* MessageLogMgr::getLog | ( | const std::string & | logName | ) | const [pure virtual] |
Gets a handle to the specified log.
| logName | The name of the desired log. |
| virtual MessageLog* MessageLogMgr::getLog | ( | ) | const [pure virtual] |
Gets a handle to log associated with the current session.
| virtual std::vector<MessageLog*> MessageLogMgr::getLogs | ( | ) | const [pure virtual] |
Gets handles for all managed logs.