Creates a branch in the log-message hierarchy. More...
|LogMessageBranch (const QString &context)|
This class is meant to be used on the stack for creating logical message branches for a function-context. The best way to use this class, for creating message branches, is to create an instance of this class on the 1st line of the function. After that log messages can be added to this branch by calling GCF::Log::info(), GCF::Log::warning(), GCF::Log::debug(), GCF::Log::error() or GCF::Log::fatal().
If no message was logged after creation on the branch, then the branch's log message will automatically be deleted when the branch object is deleted.
- Never create an instance of this class on the heap.
Constructor & Destructor Documentation
|GCF::LogMessageBranch::LogMessageBranch||(||const QString &||context||)|
Creates a log message branch. A new instance of GCF::LogMessage is created for representing this branch in the log-message hierarchy. The branch-message will be automatically deleted by the destructor, if no log messages were added to it.
context a string representing the context of the branch
Destructor. The branch message (created in the constructor) will automatically be destroyed, if no log-messages were added to it.