YARP  2.3.68+228-20170410.2+git7d0b2e0
Yet Another Robot Platform
yarp::os::Log Class Reference

#include <yarp/os/Log.h>

+ Inheritance diagram for yarp::os::Log:

Public Types

enum  LogType {
  TraceType,
  DebugType,
  InfoType,
  WarningType,
  ErrorType,
  FatalType
}
 
typedef void(* LogCallback) (yarp::os::Log::LogType, const char *, const char *, const unsigned int, const char *)
 

Public Member Functions

 Log (const char *file, const unsigned int line, const char *func)
 
 Log ()
 
virtual ~Log ()
 
void trace (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void debug (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void void info (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void void void warning (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void void void void error (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void void void void void fatal (const char *msg,...) const YARP_ATTRIBUTE_FORMAT(printf
 
void void void void void void LogStream trace () const
 
LogStream debug () const
 
LogStream info () const
 
LogStream warning () const
 
LogStream error () const
 
LogStream fatal () const
 
virtual YARP_DEPRECATED void debug (const ConstString &txt) const
 
virtual YARP_DEPRECATED void info (const ConstString &txt) const
 
virtual YARP_DEPRECATED void warning (const ConstString &txt) const
 
virtual YARP_DEPRECATED void error (const ConstString &txt) const
 
virtual YARP_DEPRECATED void fail (const ConstString &txt) const
 

Static Public Member Functions

static void setLogCallback (LogCallback)
 

Private Attributes

yarp::os::impl::LogImpl *const mPriv
 

Static Private Attributes

static LogCallback print_callback = yarp::os::impl::LogImpl::print_callback
 
static LogCallback forward_callback = yarp::os::impl::LogImpl::forward_callback
 

Friends

class LogStream
 

Detailed Description

Definition at line 49 of file Log.h.

Member Typedef Documentation

◆ LogCallback

typedef void(* yarp::os::Log::LogCallback) (yarp::os::Log::LogType, const char *, const char *, const unsigned int, const char *)

Definition at line 90 of file Log.h.

Member Enumeration Documentation

◆ LogType

Enumerator
TraceType 
DebugType 
InfoType 
WarningType 
ErrorType 
FatalType 

Definition at line 59 of file Log.h.

Constructor & Destructor Documentation

◆ Log() [1/2]

yarp::os::Log::Log ( const char *  file,
const unsigned int  line,
const char *  func 
)

Definition at line 210 of file Log.cpp.

◆ Log() [2/2]

yarp::os::Log::Log ( )

Definition at line 217 of file Log.cpp.

◆ ~Log()

yarp::os::Log::~Log ( )
virtual

Definition at line 222 of file Log.cpp.

Member Function Documentation

◆ debug() [1/3]

void yarp::os::Log::debug ( const char *  msg,
  ... 
) const

Definition at line 254 of file Log.cpp.

◆ debug() [2/3]

yarp::os::LogStream yarp::os::Log::debug ( ) const

Definition at line 274 of file Log.cpp.

◆ debug() [3/3]

virtual YARP_DEPRECATED void yarp::os::Log::debug ( const ConstString txt) const
inlinevirtual
Deprecated:
since YARP 2.3.64

Definition at line 83 of file Log.h.

◆ error() [1/3]

void yarp::os::Log::error ( const char *  msg,
  ... 
) const

Definition at line 332 of file Log.cpp.

◆ error() [2/3]

yarp::os::LogStream yarp::os::Log::error ( ) const

Definition at line 352 of file Log.cpp.

◆ error() [3/3]

virtual YARP_DEPRECATED void yarp::os::Log::error ( const ConstString txt) const
inlinevirtual
Deprecated:
since YARP 2.3.64

Definition at line 86 of file Log.h.

◆ fail()

virtual YARP_DEPRECATED void yarp::os::Log::fail ( const ConstString txt) const
inlinevirtual
Deprecated:
since YARP 2.3.64

Definition at line 87 of file Log.h.

◆ fatal() [1/2]

void yarp::os::Log::fatal ( const char *  msg,
  ... 
) const

Definition at line 359 of file Log.cpp.

◆ fatal() [2/2]

yarp::os::LogStream yarp::os::Log::fatal ( ) const

Definition at line 381 of file Log.cpp.

◆ info() [1/3]

void yarp::os::Log::info ( const char *  msg,
  ... 
) const

Definition at line 280 of file Log.cpp.

◆ info() [2/3]

yarp::os::LogStream yarp::os::Log::info ( ) const

Definition at line 300 of file Log.cpp.

◆ info() [3/3]

virtual YARP_DEPRECATED void yarp::os::Log::info ( const ConstString txt) const
inlinevirtual
Deprecated:
since YARP 2.3.64

Definition at line 84 of file Log.h.

◆ setLogCallback()

void yarp::os::Log::setLogCallback ( LogCallback  cb)
static

Definition at line 386 of file Log.cpp.

◆ trace() [1/2]

void yarp::os::Log::trace ( const char *  msg,
  ... 
) const

Definition at line 228 of file Log.cpp.

◆ trace() [2/2]

yarp::os::LogStream yarp::os::Log::trace ( ) const

Definition at line 248 of file Log.cpp.

◆ warning() [1/3]

void yarp::os::Log::warning ( const char *  msg,
  ... 
) const

Definition at line 306 of file Log.cpp.

◆ warning() [2/3]

yarp::os::LogStream yarp::os::Log::warning ( ) const

Definition at line 326 of file Log.cpp.

◆ warning() [3/3]

virtual YARP_DEPRECATED void yarp::os::Log::warning ( const ConstString txt) const
inlinevirtual
Deprecated:
since YARP 2.3.64

Definition at line 85 of file Log.h.

Friends And Related Function Documentation

◆ LogStream

friend class LogStream
friend

Definition at line 104 of file Log.h.

Member Data Documentation

◆ forward_callback

yarp::os::Log::LogCallback yarp::os::Log::forward_callback = yarp::os::impl::LogImpl::forward_callback
staticprivate

Definition at line 102 of file Log.h.

◆ mPriv

yarp::os::impl::LogImpl* const yarp::os::Log::mPriv
private

Definition at line 99 of file Log.h.

◆ print_callback

yarp::os::Log::LogCallback yarp::os::Log::print_callback = yarp::os::impl::LogImpl::print_callback
staticprivate

Definition at line 101 of file Log.h.


The documentation for this class was generated from the following files: