#include <SystemLogger.h>
Public Types | |
enum | { RTL_SILENT, RTL_ERROR, RTL_WARN, RTL_INFO, RTL_NORMAL, RTL_DEBUG, RTL_TRACE, RTL_VERBOSE, RTL_PARANOID, RTL_MANDATORY } |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef basic_logbuf < char_type, traits_type > | __logbuf_type |
typedef basic_dummybuf < char_type, traits_type > | __dummybuf_type |
typedef basic_logstream < char_type, traits_type > | __logstream_type |
typedef std::basic_ostream < char_type, traits_type > | __ostream_type |
typedef std::basic_streambuf < char_type, traits_type > | __streambuf_type |
Public Member Functions | |
basic_logstream (__streambuf_type &streambuf) | |
Constructor. | |
~basic_logstream () | |
Destructor. | |
void | setLogLevel (const std::string &level) |
Set the log level. | |
void | setLogLevel (int level) |
Set the log level. | |
void | setLogLock (bool lock) |
Set the lock mode. | |
void | enableLogLock () |
Enable the lock mode. | |
void | disableLogLock () |
Disable the lock mode. | |
__ostream_type & | level (int level) |
Acquire log stream. | |
void | acquire () |
Acquire log lock Acquire log lock when the lock mode is set. | |
void | release () |
Release the log lock Release the log lock when the lock mode is set. | |
Static Public Member Functions | |
static int | strToLogLevel (const std::string &lv) |
Set the log level. | |
static std::string | printf (char const *__restrict fmt,...) |
Formatted output like printf. | |
Public Attributes | |
__ostream_type | m_DummyStream |
Dummy log. |
This is a logger format class like basic_ostream.
typedef _CharT RTC::basic_logstream< _CharT, _Traits >::char_type |
typedef _Traits RTC::basic_logstream< _CharT, _Traits >::traits_type |
typedef basic_logbuf<char_type, traits_type> RTC::basic_logstream< _CharT, _Traits >::__logbuf_type |
typedef basic_dummybuf<char_type, traits_type> RTC::basic_logstream< _CharT, _Traits >::__dummybuf_type |
typedef basic_logstream<char_type, traits_type> RTC::basic_logstream< _CharT, _Traits >::__logstream_type |
typedef std::basic_ostream<char_type, traits_type> RTC::basic_logstream< _CharT, _Traits >::__ostream_type |
typedef std::basic_streambuf<char_type, traits_type> RTC::basic_logstream< _CharT, _Traits >::__streambuf_type |
anonymous enum |
RTC::basic_logstream< _CharT, _Traits >::basic_logstream | ( | __streambuf_type & | streambuf | ) | [inline] |
Constructor.
Constructor
streambuf | basic_streambuf type object |
RTC::basic_logstream< _CharT, _Traits >::~basic_logstream | ( | ) | [inline] |
Destructor.
Destructor
static int RTC::basic_logstream< _CharT, _Traits >::strToLogLevel | ( | const std::string & | lv | ) | [inline, static] |
Set the log level.
Set the log level corresponding to the given string.
lv | Log level string |
static std::string RTC::basic_logstream< _CharT, _Traits >::printf | ( | char const *__restrict | fmt, | |
... | ||||
) | [inline, static] |
Formatted output like printf.
Output a log with a format like printf.
fmt | Formatted string |
void RTC::basic_logstream< _CharT, _Traits >::setLogLevel | ( | const std::string & | level | ) | [inline] |
Set the log level.
Set the log level corresponding to the given string.
level | Log level string |
void RTC::basic_logstream< _CharT, _Traits >::setLogLevel | ( | int | level | ) | [inline] |
Set the log level.
Set the log level.
level | Log level |
void RTC::basic_logstream< _CharT, _Traits >::setLogLock | ( | bool | lock | ) | [inline] |
Set the lock mode.
Set the lock mode of log.
lock | Flag of log lock |
void RTC::basic_logstream< _CharT, _Traits >::enableLogLock | ( | ) | [inline] |
Enable the lock mode.
Enable the lock mode.
void RTC::basic_logstream< _CharT, _Traits >::disableLogLock | ( | ) | [inline] |
Disable the lock mode.
Disable the lock mode.
__ostream_type& RTC::basic_logstream< _CharT, _Traits >::level | ( | int | level | ) | [inline] |
Acquire log stream.
Investigate the specified log level and get its log stream. If the specified log level is under the set log level, this class will be returned. If the specified log level exceeds the set log level, a dummy log class will be returned.
level | The specified log level |
void RTC::basic_logstream< _CharT, _Traits >::acquire | ( | ) | [inline] |
Acquire log lock Acquire log lock when the lock mode is set.
void RTC::basic_logstream< _CharT, _Traits >::release | ( | ) | [inline] |
Release the log lock Release the log lock when the lock mode is set.
__ostream_type RTC::basic_logstream< _CharT, _Traits >::m_DummyStream |
Dummy log.