Robowflex  v0.1
Making MoveIt Easy
robowflex::log Namespace Reference

Logging functions. More...

Functions

std::string formatRecurse (boost::format &f)
 Recursion base case, return string form of formatted arguments. More...
 
template<class T , class... Args>
std::string formatRecurse (boost::format &f, T &&t, Args &&... args)
 Recursion base case, return string form of formatted arguments. More...
 
template<typename... Args>
std::string format (const std::string &fmt, Args &&... args)
 Recursion base case, return string form of formatted arguments. More...
 
void showUpToFatal ()
 Show all logging messages fatal and above. More...
 
void showUpToError ()
 Show all logging messages error and above. More...
 
void showUpToWarning ()
 Show all logging messages warning and above. More...
 
void showUpToInfo ()
 Show all logging messages info and above. More...
 
void showUpToDebug ()
 Show all logging messages debug and above. More...
 

Detailed Description

Logging functions.

Function Documentation

◆ format()

template<typename... Args>
std::string robowflex::log::format ( const std::string fmt,
Args &&...  args 
)

Recursion base case, return string form of formatted arguments.

Template Parameters

Definition at line 60 of file log.h.

61  {
62  boost::format f(fmt);
63  return formatRecurse(f, std::forward<Args>(args)...);
64  }
std::string format(const std::string &fmt, Args &&... args)
Recursion base case, return string form of formatted arguments.
Definition: log.h:60
std::string formatRecurse(boost::format &f, T &&t, Args &&... args)
Recursion base case, return string form of formatted arguments.
Definition: log.h:48

◆ formatRecurse() [1/2]

std::string robowflex::log::formatRecurse ( boost::format &  f)

Recursion base case, return string form of formatted arguments.

Parameters
[in]fFormatter.
Returns
String of formatted arguments.

Definition at line 16 of file log.cpp.

17 {
18  return boost::str(f);
19 }

◆ formatRecurse() [2/2]

template<class T , class... Args>
std::string robowflex::log::formatRecurse ( boost::format &  f,
T &&  t,
Args &&...  args 
)

Recursion base case, return string form of formatted arguments.

Template Parameters

Definition at line 48 of file log.h.

49  {
50  return formatRecurse(f % std::forward<T>(t), std::forward<Args>(args)...);
51  }

◆ showUpToDebug()

void robowflex::log::showUpToDebug ( )

Show all logging messages debug and above.

Definition at line 41 of file log.cpp.

42 {
43  setLoggerLevel(ros::console::levels::Debug);
44 }

◆ showUpToError()

void robowflex::log::showUpToError ( )

Show all logging messages error and above.

Definition at line 26 of file log.cpp.

27 {
28  setLoggerLevel(ros::console::levels::Error);
29 }

◆ showUpToFatal()

void robowflex::log::showUpToFatal ( )

Show all logging messages fatal and above.

Definition at line 21 of file log.cpp.

22 {
23  setLoggerLevel(ros::console::levels::Fatal);
24 }

◆ showUpToInfo()

void robowflex::log::showUpToInfo ( )

Show all logging messages info and above.

Definition at line 36 of file log.cpp.

37 {
38  setLoggerLevel(ros::console::levels::Info);
39 }

◆ showUpToWarning()

void robowflex::log::showUpToWarning ( )

Show all logging messages warning and above.

Definition at line 31 of file log.cpp.

32 {
33  setLoggerLevel(ros::console::levels::Warn);
34 }