YARP  2.3.68+220-20170323.2+git4955ef0
Yet Another Robot Platform
Log.h File Reference
#include <yarp/os/api.h>
#include <iosfwd>
#include <cstdio>
#include <cstdlib>
#include <yarp/os/ConstString.h>
+ Include dependency graph for Log.h:

Go to the source code of this file.

Classes

class  yarp::os::Log
 

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 __YFUNCTION__   __PRETTY_FUNCTION__
 
#define YARP_ATTRIBUTE_FORMAT(style, fmt, args)   __attribute__((format(printf, (fmt), (args))))
 
#define yTrace   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).trace
 
#define yDebug   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).debug
 
#define yInfo   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).info
 
#define yWarning   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).warning
 
#define yError   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).error
 
#define yFatal   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).fatal
 
#define yAssert(x)   if (!(x)) { yFatal("Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); }
 
#define YARP_FIXME_NOTIMPLEMENTED(what)   yWarning("FIXME: %s not yet implemented", what);
 
#define YARP_LOG_ERROR(x)   __yarp_error(x)
 
#define YARP_LOG_WARN(x)   __yarp_warn(x)
 
#define YARP_LOG_INFO(x)   __yarp_info(x)
 
#define YARP_LOG_DEBUG(x)   __yarp_debug(x)
 
#define YARP_ASSERT(x)   YARP_COMPILER_DEPRECATED_WARNING(YARP_ASSERT is deprecated. Use yAssert instead.); yAssert(x)
 Very basic assertion macro. More...
 

Functions

void yarp_print_trace (FILE *out, const char *file, int line)
 Low level function for printing a stack trace, if implemented (ACE or gcc/Linux). More...
 
YARP_OS_DEPRECATED_API void __yarp_debug (const yarp::os::ConstString &str)
 
YARP_OS_DEPRECATED_API void __yarp_info (const yarp::os::ConstString &str)
 
YARP_OS_DEPRECATED_API void __yarp_warn (const yarp::os::ConstString &str)
 
YARP_OS_DEPRECATED_API void __yarp_error (const yarp::os::ConstString &str)
 
YARP_OS_DEPRECATED_API bool yarp_show_error ()
 
YARP_OS_DEPRECATED_API bool yarp_show_warn ()
 
YARP_OS_DEPRECATED_API bool yarp_show_info ()
 
YARP_OS_DEPRECATED_API bool yarp_show_debug ()
 

Macro Definition Documentation

◆ __YFUNCTION__

#define __YFUNCTION__   __PRETTY_FUNCTION__

Definition at line 22 of file Log.h.

◆ YARP_ASSERT

#define YARP_ASSERT (   x)    YARP_COMPILER_DEPRECATED_WARNING(YARP_ASSERT is deprecated. Use yAssert instead.); yAssert(x)

Very basic assertion macro.

Deprecated:
since YARP 2.3.64

Definition at line 167 of file Log.h.

◆ YARP_ATTRIBUTE_FORMAT

#define YARP_ATTRIBUTE_FORMAT (   style,
  fmt,
  args 
)    __attribute__((format(printf, (fmt), (args))))

Definition at line 36 of file Log.h.

◆ YARP_FIXME_NOTIMPLEMENTED

#define YARP_FIXME_NOTIMPLEMENTED (   what)    yWarning("FIXME: %s not yet implemented", what);

Definition at line 120 of file Log.h.

◆ YARP_LOG_DEBUG

#define YARP_LOG_DEBUG (   x)    __yarp_debug(x)
Deprecated:
since YARP 2.3.64

Definition at line 160 of file Log.h.

◆ YARP_LOG_ERROR

#define YARP_LOG_ERROR (   x)    __yarp_error(x)
Deprecated:
since YARP 2.3.64

Definition at line 145 of file Log.h.

◆ YARP_LOG_INFO

#define YARP_LOG_INFO (   x)    __yarp_info(x)
Deprecated:
since YARP 2.3.64

Definition at line 155 of file Log.h.

◆ YARP_LOG_WARN

#define YARP_LOG_WARN (   x)    __yarp_warn(x)
Deprecated:
since YARP 2.3.64

Definition at line 150 of file Log.h.

◆ yAssert

#define yAssert (   x)    if (!(x)) { yFatal("Assertion failure at %s:%d (%s)", __FILE__, __LINE__, #x); }

Definition at line 118 of file Log.h.

◆ yDebug

#define yDebug   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).debug

Definition at line 112 of file Log.h.

◆ yError

#define yError   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).error

Definition at line 115 of file Log.h.

◆ yFatal

#define yFatal   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).fatal

Definition at line 116 of file Log.h.

◆ yInfo

#define yInfo   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).info

Definition at line 113 of file Log.h.

◆ yTrace

#define yTrace   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).trace

Definition at line 111 of file Log.h.

◆ yWarning

#define yWarning   yarp::os::Log(__FILE__, __LINE__, __YFUNCTION__).warning

Definition at line 114 of file Log.h.

Function Documentation

◆ __yarp_debug()

YARP_OS_DEPRECATED_API void __yarp_debug ( const yarp::os::ConstString str)
inline
Deprecated:
since YARP 2.3.64

Definition at line 131 of file Log.h.

◆ __yarp_error()

YARP_OS_DEPRECATED_API void __yarp_error ( const yarp::os::ConstString str)
inline
Deprecated:
since YARP 2.3.64

Definition at line 134 of file Log.h.

◆ __yarp_info()

YARP_OS_DEPRECATED_API void __yarp_info ( const yarp::os::ConstString str)
inline
Deprecated:
since YARP 2.3.64

Definition at line 132 of file Log.h.

◆ __yarp_warn()

YARP_OS_DEPRECATED_API void __yarp_warn ( const yarp::os::ConstString str)
inline
Deprecated:
since YARP 2.3.64

Definition at line 133 of file Log.h.

◆ yarp_print_trace()

void yarp_print_trace ( FILE *  out,
const char *  file,
int  line 
)

Low level function for printing a stack trace, if implemented (ACE or gcc/Linux).

Definition at line 391 of file Log.cpp.

◆ yarp_show_debug()

YARP_OS_DEPRECATED_API bool yarp_show_debug ( )
inline
Deprecated:
since YARP 2.3.64

Definition at line 140 of file Log.h.

◆ yarp_show_error()

YARP_OS_DEPRECATED_API bool yarp_show_error ( )
inline
Deprecated:
since YARP 2.3.64

Definition at line 137 of file Log.h.

◆ yarp_show_info()

YARP_OS_DEPRECATED_API bool yarp_show_info ( )
inline
Deprecated:
since YARP 2.3.64

Definition at line 139 of file Log.h.

◆ yarp_show_warn()

YARP_OS_DEPRECATED_API bool yarp_show_warn ( )
inline
Deprecated:
since YARP 2.3.64

Definition at line 138 of file Log.h.