The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::VLogger::Context Struct Reference

Set logging context with auto-cleanup. More...

#include <ocean/plankton/VLogger.hpp>

Public Member Functions

 Context (const char *s)
 Open a context for logging.
 
 ~Context ()
 Destructor closes the current context for logging and sets the context to the previous one.
 

Detailed Description

Set logging context with auto-cleanup.

A context can be a function entry, or a loop, or a brace, practically any kind of local lifetime of an object. The context is specified via creation of a temporary variable, the specified string is arbitrary (user-defined):

void f()
{
VLogger::Context tmp("void f()");
}
Set logging context with auto-cleanup.
Definition VLogger.hpp:221
Note
The behaviour of non-automatic Context variables is undefined. Variables which are static or allocated by new will conflict with the concept of a function call stack and will confuse the logging facility. Don't do this.

Constructor & Destructor Documentation

◆ Context()

Wizt::VLogger::Context::Context ( const char *  s)
inline

Open a context for logging.

The destructor of this object will automatically close the context.