clutchlog  0.1.0
Functions
Configuration accessors

Functions

void clutchlog::format (const std::string &format)
 Set the template string.
 
std::string clutchlog::format () const
 Get the template string.
 
void clutchlog::format_comment (const std::string &format)
 Set the template string for dumps.
 
std::string clutchlog::format_comment () const
 Get the template string for dumps.
 
void clutchlog::out (std::ostream &out)
 Set the output stream on which to print.
 
std::ostream & clutchlog::out ()
 Get the output stream on which to print.
 
void clutchlog::threshold (level l)
 Set the log level below which logs are not printed.
 
level clutchlog::threshold () const
 Get the log level below which logs are not printed.
 
void clutchlog::file (std::string file)
 Set the regular expression filtering the file location.
 
void clutchlog::func (std::string func)
 Set the regular expression filtering the function location.
 
void clutchlog::line (std::string line)
 Set the regular expression filtering the line location.
 
void clutchlog::location (const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*")
 Set the regular expressions filtering the location.
 
template<class ... FMT>
void clutchlog::style (level stage, FMT... styles)
 Set the style (color and typo) of the given log level. More...
 
void clutchlog::style (level stage, fmt style)
 Set the style (color and typo) of the given log level, passing a fmt instance.
 
fmt clutchlog::style (level stage) const
 Get the configured fmt instance of the given log level.
 
level clutchlog::level_of (const std::string name)
 Return the log level tag corresponding to the given pre-configured name. More...
 

Detailed Description

Function Documentation

◆ level_of()

level clutchlog::level_of ( const std::string  name)
inline

Return the log level tag corresponding to the given pre-configured name.

Note
: This is case sensitive, see the pre-configured _level_word.

◆ style()

template<class ... FMT>
void clutchlog::style ( level  stage,
FMT...  styles 
)
inline

Set the style (color and typo) of the given log level.

This version accept style arguments as if they were passed to clutchlog::fmt.