Loading...
Searching...
No Matches
terra::util::detail::PrefixCout Class Referencefinal

std::ostream subclass to enable logging with prefix and only on root. More...

#include <logging.hpp>

Inheritance diagram for terra::util::detail::PrefixCout:

Public Member Functions

 PrefixCout (std::function< std::string() > prefix=[]() { return "";}, bool only_root=true)
 
int overflow (int ch) override
 

Detailed Description

std::ostream subclass to enable logging with prefix and only on root.

Use global instances of this class like logroot as a replacement for std::cout.

Constructor & Destructor Documentation

◆ PrefixCout()

terra::util::detail::PrefixCout::PrefixCout ( std::function< std::string() >  prefix = []() { return ""; },
bool  only_root = true 
)
inlineexplicit

Member Function Documentation

◆ overflow()

int terra::util::detail::PrefixCout::overflow ( int  ch)
inlineoverride

The documentation for this class was generated from the following file: