OpenRTM-aist 2.1.0
Loading...
Searching...
No Matches
SystemLogger.h File Reference

RT component logger class. More...

#include <rtm/config_rtc.h>
#include <coil/ClockManager.h>
#include <coil/Logger.h>
#include <mutex>
#include <coil/stringutil.h>
#include <coil/Properties.h>
#include <string>
Include dependency graph for SystemLogger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RTC::Logger
 Logger class. More...

Namespaces

namespace  RTC
 RT-Component.

Macros

#define RTC_LOG(LV, fmt)
 General-purpose log output macro.
#define RTC_LOG_STR(LV, str)
#define RTC_FATAL(fmt)
 Error log output macro.
#define RTC_FATAL_STR(str)
#define RTC_ERROR(fmt)
 Error log output macro.
#define RTC_ERROR_STR(str)
#define RTC_WARN(fmt)
 Warning log output macro.
#define RTC_WARN_STR(str)
#define RTC_INFO(fmt)
 Information level log output macro.
#define RTC_INFO_STR(str)
#define RTC_DEBUG(fmt)
 Debug level log output macro.
#define RTC_DEBUG_STR(str)
#define RTC_TRACE(fmt)
 Trace level log output macro.
#define RTC_TRACE_STR(str)
#define RTC_VERBOSE(fmt)
 Verbose level log output macro.
#define RTC_VERBOSE_STR(str)
#define RTC_PARANOID(fmt)
 Paranoid level log output macro.
#define RTC_PARANOID_STR(str)

Typedefs

using RTC::LogStreamBuf = ::coil::LogStreamBuffer
using RTC::LogStream = ::coil::LogStream

Detailed Description

RT component logger class.

Date
Date
2007-07-20 16:10:32
Author
Noriaki Ando n-and.nosp@m.o@ai.nosp@m.st.go.nosp@m..jp

Copyright (C) 2003-2008 Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

$Id$

Macro Definition Documentation

◆ RTC_DEBUG

#define RTC_DEBUG ( fmt)
Value:
#define RTC_LOG(LV, fmt)
General-purpose log output macro.
Definition SystemLogger.h:537
@ RTL_DEBUG
Definition SystemLogger.h:110

Debug level log output macro.

If log levels are ( DEBUG, TRACE, VERBOSE, PARANOID ), message will be output to log.

Referenced by RTC::InPort< DataType >::InPort(), RTC::InPort< DataType >::isEmpty(), RTC::InPort< DataType >::isEmpty(), RTC::InPort< DataType >::isEmpty(), RTC::InPort< DataType >::isNew(), RTC::InPort< DataType >::isNew(), RTC::InPort< DataType >::isNew(), RTC::OutPort< DataType >::OutPort(), RTC::InPort< DataType >::read(), and RTC::OutPort< DataType >::write().

◆ RTC_DEBUG_STR

#define RTC_DEBUG_STR ( str)
Value:
#define RTC_LOG_STR(LV, str)
Definition SystemLogger.h:548

◆ RTC_ERROR

#define RTC_ERROR ( fmt)
Value:
@ RTL_ERROR
Definition SystemLogger.h:107

Error log output macro.

This is a log output macro of the error level. If log levels are ERROR, WARN, INFO, DEBUG, TRACE, VERBOSE and PARANOID, message will be output to log.

Referenced by RTC::InPort< DataType >::read(), RTC::InPortConnector::read(), and RTC::OutPortConnector::write().

◆ RTC_ERROR_STR

#define RTC_ERROR_STR ( str)

◆ RTC_FATAL

#define RTC_FATAL ( fmt)
Value:
@ RTL_FATAL
Definition SystemLogger.h:106

Error log output macro.

This is a log output macro of the error level. If log levels are FATAL, ERROR, WARN, INFO, NORMAL, DEBUG, TRACE, VERBOSE or PARANOID, message will be output to log.

◆ RTC_FATAL_STR

#define RTC_FATAL_STR ( str)

◆ RTC_INFO

#define RTC_INFO ( fmt)
Value:
@ RTL_INFO
Definition SystemLogger.h:109

Information level log output macro.

If log levels are ( INFO, DEBUG, TRACE, VERBOSE, PARANOID ), message will be output to log.

◆ RTC_INFO_STR

#define RTC_INFO_STR ( str)

◆ RTC_LOG

#define RTC_LOG ( LV,
fmt )
Value:
do{ \
if (rtclog.isValid(LV)) \
{ \
std::string str = ::coil::sprintf fmt; \
rtclog.lock(); \
rtclog.write(LV, str); \
rtclog.unlock(); \
} \
} while(0)

General-purpose log output macro.

Lock log level and output format string as arguments.

◆ RTC_LOG_STR

#define RTC_LOG_STR ( LV,
str )
Value:
do { \
if (rtclog.isValid(LV)) \
{ \
rtclog.lock(); \
rtclog.write(LV, str); \
rtclog.unlock(); \
} \
} while(0)

◆ RTC_PARANOID

#define RTC_PARANOID ( fmt)
Value:
@ RTL_PARANOID
Definition SystemLogger.h:113

Paranoid level log output macro.

If log levels are ( PARANOID ), message will be output to log.

Referenced by RTC::InPortConnector::getDirectData(), and RTC::OutPortConnector::write().

◆ RTC_PARANOID_STR

#define RTC_PARANOID_STR ( str)

◆ RTC_TRACE

◆ RTC_TRACE_STR

#define RTC_TRACE_STR ( str)

◆ RTC_VERBOSE

#define RTC_VERBOSE ( fmt)
Value:
@ RTL_VERBOSE
Definition SystemLogger.h:112

Verbose level log output macro.

If log levels are ( VERBOSE, PARANOID ), message will be output to log.

◆ RTC_VERBOSE_STR

#define RTC_VERBOSE_STR ( str)

◆ RTC_WARN

#define RTC_WARN ( fmt)
Value:
@ RTL_WARN
Definition SystemLogger.h:108

Warning log output macro.

If log levels are ( WARN, INFO, DEBUG, TRACE, VERBOSE, PARANOID ), message will be output to log.

Referenced by RTC::InPort< DataType >::read(), and RTC::OutPort< DataType >::write().

◆ RTC_WARN_STR

#define RTC_WARN_STR ( str)