Support Class Library
A set of tools providing classes and utility
Functions
scl::tools::iostream::log::prefixed Namespace Reference

Logging funtions with prefixes. More...

Functions

template<class T = std::string>
std::function< decltype(std::cout)&(const T &)> log (const char *const prefix)
 Log for the given type on stdout w/ a prefix and end with a line break. More...
 
template<class T = std::string>
std::function< decltype(std::cerr)&(const T &)> error (const char *const prefix)
 Log for the given type on stderr w/ a prefix and end with a line break. More...
 

Detailed Description

Logging funtions with prefixes.

Function Documentation

◆ error()

template<class T = std::string>
std::function<decltype(std::cerr)&(const T&)> scl::tools::iostream::log::prefixed::error ( const char *const  prefix)
inline

Log for the given type on stderr w/ a prefix and end with a line break.

Template Parameters
Tbeing the type of objects to log
Parameters
prefixbeing the prefix
Returns
a logging function that uses the prefix

Definition at line 39 of file prefixed.h.

◆ log()

template<class T = std::string>
std::function<decltype(std::cout)&(const T&)> scl::tools::iostream::log::prefixed::log ( const char *const  prefix)
inline

Log for the given type on stdout w/ a prefix and end with a line break.

Template Parameters
Tbeing the type of objects to log
Parameters
prefixbeing the prefix
Returns
a logging function that uses the prefix

Definition at line 25 of file prefixed.h.