YARP  2.3.70.1
Yet Another Robot Platform
Logger.h File Reference
#include <yarp/conf/api.h>
#include <yarp/conf/system.h>
#include <yarp/os/ConstString.h>
#include <yarp/os/Log.h>
#include <yarp/os/impl/PlatformStdio.h>
#include <cstdio>
+ Include dependency graph for Logger.h:

Go to the source code of this file.

Classes

class  yarp::os::impl::Logger
 This is a wrapper for message logging. More...
 

Namespaces

 yarp
 The main, catch-all namespace for YARP.
 
 yarp::os
 An interface to the operating system, including Port based communication.
 
 yarp::os::impl
 The components from which ports and connections are built.
 

Macros

#define LM_DEBUG   04
 
#define LM_INFO   010
 
#define LM_WARNING   040
 
#define LM_ERROR   0200
 
#define YARP_ERROR(log, x)   ((Logger*)&(log))->internal_error(x)
 
#define YARP_WARN(log, x)   ((Logger*)&(log))->internal_warning(x)
 
#define YARP_INFO(log, x)   ((Logger*)&(log))->internal_info(x)
 
#define YARP_DEBUG(log, x)   ((Logger*)&(log))->internal_debug(x)
 
#define YARP_FAIL(log, x)   ((Logger*)&(log))->internal_fail(x)
 
#define YARP_LONGEST_MESSAGE   1000
 
#define YARP_SPRINTF0(log, mode, msg)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg); (log).internal_ ## mode(&(_yarp_buf[0])); }
 
#define YARP_SPRINTF1(log, mode, msg, a)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a); (log).internal_ ## mode(&(_yarp_buf[0])); }
 
#define YARP_SPRINTF2(log, mode, msg, a, b)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b); (log).internal_ ## mode(&(_yarp_buf[0])); }
 
#define YARP_SPRINTF3(log, mode, msg, a, b, c)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c); (log).internal_ ## mode(&(_yarp_buf[0])); }
 
#define YARP_SPRINTF4(log, mode, msg, a, b, c, d)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c, d); (log).internal_ ## mode(&(_yarp_buf[0])); }
 
#define YARP_SPRINTF5(log, mode, msg, a, b, c, d, e)   { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c, d, e); (log).internal_ ## mode(&(_yarp_buf[0])); }
 

Macro Definition Documentation

◆ LM_DEBUG

#define LM_DEBUG   04

Definition at line 26 of file Logger.h.

◆ LM_ERROR

#define LM_ERROR   0200

Definition at line 29 of file Logger.h.

◆ LM_INFO

#define LM_INFO   010

Definition at line 27 of file Logger.h.

◆ LM_WARNING

#define LM_WARNING   040

Definition at line 28 of file Logger.h.

◆ YARP_DEBUG

#define YARP_DEBUG (   log,
 
)    ((Logger*)&(log))->internal_debug(x)

Definition at line 201 of file Logger.h.

◆ YARP_ERROR

#define YARP_ERROR (   log,
 
)    ((Logger*)&(log))->internal_error(x)

Definition at line 197 of file Logger.h.

◆ YARP_FAIL

#define YARP_FAIL (   log,
 
)    ((Logger*)&(log))->internal_fail(x)

Definition at line 205 of file Logger.h.

◆ YARP_INFO

#define YARP_INFO (   log,
 
)    ((Logger*)&(log))->internal_info(x)

Definition at line 199 of file Logger.h.

◆ YARP_LONGEST_MESSAGE

#define YARP_LONGEST_MESSAGE   1000

Definition at line 207 of file Logger.h.

◆ YARP_SPRINTF0

#define YARP_SPRINTF0 (   log,
  mode,
  msg 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 208 of file Logger.h.

◆ YARP_SPRINTF1

#define YARP_SPRINTF1 (   log,
  mode,
  msg,
  a 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 209 of file Logger.h.

◆ YARP_SPRINTF2

#define YARP_SPRINTF2 (   log,
  mode,
  msg,
  a,
  b 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 210 of file Logger.h.

◆ YARP_SPRINTF3

#define YARP_SPRINTF3 (   log,
  mode,
  msg,
  a,
  b,
 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 211 of file Logger.h.

◆ YARP_SPRINTF4

#define YARP_SPRINTF4 (   log,
  mode,
  msg,
  a,
  b,
  c,
 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c, d); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 212 of file Logger.h.

◆ YARP_SPRINTF5

#define YARP_SPRINTF5 (   log,
  mode,
  msg,
  a,
  b,
  c,
  d,
 
)    { char _yarp_buf[YARP_LONGEST_MESSAGE]; snprintf(&(_yarp_buf[0]), YARP_LONGEST_MESSAGE, msg, a, b, c, d, e); (log).internal_ ## mode(&(_yarp_buf[0])); }

Definition at line 213 of file Logger.h.

◆ YARP_WARN

#define YARP_WARN (   log,
 
)    ((Logger*)&(log))->internal_warning(x)

Definition at line 198 of file Logger.h.