19 #ifndef RTC_SYSTEMLOGGER_H 20 #define RTC_SYSTEMLOGGER_H 134 Logger(
const char* name =
"");
153 Logger(LogStreamBuf* streambuf);
280 void setName(
const char* name);
341 std::string m_dateFormat;
342 static const char* m_levelString[];
364 #define RTC_LOG(LV, fmt) \ 365 if (rtclog.isValid(LV)) \ 367 std::string str = ::coil::sprintf fmt; \ 369 rtclog.level(LV) << str << std::endl; \ 373 #define RTC_LOG_STR(LV, str) \ 374 if (rtclog.isValid(LV)) \ 377 rtclog.level(LV) << str << std::endl; \ 400 #define RTC_FATAL(fmt) RTC_LOG(::RTC::Logger::RTL_FATAL, fmt) 401 #define RTC_FATAL_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_FATAL, str) 422 #define RTC_ERROR(fmt) RTC_LOG(::RTC::Logger::RTL_ERROR, fmt) 423 #define RTC_ERROR_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_ERROR, str) 444 #define RTC_WARN(fmt) RTC_LOG(::RTC::Logger::RTL_WARN, fmt) 445 #define RTC_WARN_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_WARN, str) 466 #define RTC_INFO(fmt) RTC_LOG(::RTC::Logger::RTL_INFO, fmt) 467 #define RTC_INFO_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_INFO, str) 488 #define RTC_DEBUG(fmt) RTC_LOG(::RTC::Logger::RTL_DEBUG, fmt) 489 #define RTC_DEBUG_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_DEBUG, str) 510 #define RTC_TRACE(fmt) RTC_LOG(::RTC::Logger::RTL_TRACE, fmt) 511 #define RTC_TRACE_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_TRACE, str) 533 #define RTC_VERBOSE(fmt) RTC_LOG(::RTC::Logger::RTL_VERBOSE, fmt) 534 #define RTC_VERBOSE_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_VERBOSE, str) 555 #define RTC_PARANOID(fmt) RTC_LOG(::RTC::Logger::RTL_PARANOID, fmt) 556 #define RTC_PARANOID_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_PARANOID, str) 559 #define RTC_ERROR(fmt) 560 #define RTC_ERROR_STR(str) 561 #define RTC_WARN(fmt) 562 #define RTC_WARN_STR(str) 563 #define RTC_NORMAL(fmt) 564 #define RTC_NORMAL_STR(str) 565 #define RTC_INFO(fmt) 566 #define RTC_INFO_STR(str) 567 #define RTC_DEBUG(fmt) 568 #define RTC_DEBUG_STR(str) 569 #define RTC_TRACE(fmt) 570 #define RTC_TRACE_STR(str) 571 #define RTC_VERBOSE(fmt) 572 #define RTC_VERBOSE_STR(str) 573 #define RTC_PARANOID(fmt) 574 #define RTC_PARANOID_STR(str) 579 #endif // RTC_SYSTEMLOGGER_H virtual ~Logger(void)
仮想デストラクタ
bool setLevel(const char *level)
ログレベルを文字列で設定する
::coil::LogStreamBuffer LogStreamBuf
Definition: SystemLogger.h:34
::coil::LogStream LogStream
Definition: SystemLogger.h:35
Definition: SystemLogger.h:113
Definition: SystemLogger.h:110
Definition: SystemLogger.h:109
Logger(const char *name="")
コンストラクタ
Definition: SystemLogger.h:105
Definition: SystemLogger.h:106
void setDateFormat(const char *format)
ヘッダに付加する日時フォーマットを指定する。
log_stream テンプレートクラス
Definition: Logger.h:540
Definition: SystemLogger.h:108
Definition: SystemLogger.h:112
virtual void header(int level)
メッセージのプリフィックス追加関数
Logger クラス
Definition: SystemLogger.h:99
log_streambuf< char > LogStreamBuffer
Definition: Logger.h:932
std::string getDate(void)
フォーマットされた現在日時文字列を取得する。 指定された書式で記述し...
ostream_type & level(int level)
ログストリームの取得
Definition: Logger.h:732
log_streambuf and log_stream class
Definition: SystemLogger.h:111
Definition: SystemLogger.h:107
void setName(const char *name)
ヘッダの日時の後に付加する文字列を設定する。
int strToLevel(const char *level)
ログレベル設定 与えられた文字列に対応したログレベルを設定する。 ...