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

A class for setting a temporary increment of the indentation of logging text; it allows to indent logged text automatically during the lifetime of the Indent object. More...

#include <ocean/plankton/VLogger.hpp>

Public Member Functions

 Indent (int i)
 Open a context for logging.
 
 ~Indent ()
 Destructor resets the indentation.
 

Detailed Description

A class for setting a temporary increment of the indentation of logging text; it allows to indent logged text automatically during the lifetime of the Indent object.

Use code like this:

void f()
{
VLogger::print(10, "function call");
{VLogger::Indent Tmp(2);
VLogger::print(10, "local block");
}
VLogger::print(10, "local block ended");
}
A class for setting a temporary increment of the indentation of logging text; it allows to indent log...
Definition VLogger.hpp:261
static void print(const string &text, int verbosity, int indent_spaces, const string &srcfilename, unsigned linenumber, const WeakPtr< VTask > &ThreadID, const string &funcname)
Verbose print function.
Definition VLogger.cpp:146
Note
Only create automatic variables of this class type, dynamic or static variables will not work and just confuse the logging stack,

Constructor & Destructor Documentation

◆ Indent()

Wizt::VLogger::Indent::Indent ( int  i)
inline

Open a context for logging.

The destructor of this object will automatically close the context.