YARP
Yet Another Robot Platform
yarp::os::Log Class Reference

#include <yarp/os/Log.h>

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

Detailed Description

Definition at line 43 of file Log.h.

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
 
void debug (const char *msg,...) const
 
void info (const char *msg,...) const
 
void warning (const char *msg,...) const
 
void error (const char *msg,...) const
 
void fatal (const char *msg,...) const
 
LogStream trace () const
 
LogStream debug () const
 
LogStream info () const
 
LogStream warning () const
 
LogStream error () const
 
LogStream fatal () 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
 

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 76 of file Log.h.

Member Enumeration Documentation

◆ LogType

Enumerator
TraceType 
DebugType 
InfoType 
WarningType 
ErrorType 
FatalType 

Definition at line 53 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 215 of file Log.cpp.

◆ Log() [2/2]

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

Definition at line 222 of file Log.cpp.

◆ ~Log()

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

Definition at line 227 of file Log.cpp.

Member Function Documentation

◆ debug() [1/2]

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

Definition at line 263 of file Log.cpp.

◆ debug() [2/2]

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

Definition at line 287 of file Log.cpp.

◆ error() [1/2]

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

Definition at line 353 of file Log.cpp.

◆ error() [2/2]

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

Definition at line 377 of file Log.cpp.

◆ fatal() [1/2]

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

Definition at line 384 of file Log.cpp.

◆ fatal() [2/2]

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

Definition at line 410 of file Log.cpp.

◆ info() [1/2]

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

Definition at line 293 of file Log.cpp.

◆ info() [2/2]

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

Definition at line 317 of file Log.cpp.

◆ setLogCallback()

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

Definition at line 415 of file Log.cpp.

◆ trace() [1/2]

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

Definition at line 233 of file Log.cpp.

◆ trace() [2/2]

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

Definition at line 257 of file Log.cpp.

◆ warning() [1/2]

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

Definition at line 323 of file Log.cpp.

◆ warning() [2/2]

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

Definition at line 347 of file Log.cpp.

Friends And Related Function Documentation

◆ LogStream

friend class LogStream
friend

Definition at line 90 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 88 of file Log.h.

◆ mPriv

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

Definition at line 85 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 87 of file Log.h.


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