[詳解]
19 #ifndef RTC_SYSTEMLOGGER_H
20 #define RTC_SYSTEMLOGGER_H
134 Logger(
const char* name =
"");
320 void setName(
const char* name);
417 std::string m_dateFormat;
419 static const char* m_levelString[];
442 #define RTC_LOG(LV, fmt) \
443 if (rtclog.isValid(LV)) \
445 std::string str = ::coil::sprintf fmt; \
447 rtclog.level(LV) << str << std::endl; \
451 #define RTC_LOG_STR(LV, str) \
452 if (rtclog.isValid(LV)) \
455 rtclog.level(LV) << str << std::endl; \
478 #define RTC_FATAL(fmt) RTC_LOG(::RTC::Logger::RTL_FATAL, fmt)
479 #define RTC_FATAL_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_FATAL, str)
500 #define RTC_ERROR(fmt) RTC_LOG(::RTC::Logger::RTL_ERROR, fmt)
501 #define RTC_ERROR_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_ERROR, str)
522 #define RTC_WARN(fmt) RTC_LOG(::RTC::Logger::RTL_WARN, fmt)
523 #define RTC_WARN_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_WARN, str)
544 #define RTC_INFO(fmt) RTC_LOG(::RTC::Logger::RTL_INFO, fmt)
545 #define RTC_INFO_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_INFO, str)
566 #define RTC_DEBUG(fmt) RTC_LOG(::RTC::Logger::RTL_DEBUG, fmt)
567 #define RTC_DEBUG_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_DEBUG, str)
588 #define RTC_TRACE(fmt) RTC_LOG(::RTC::Logger::RTL_TRACE, fmt)
589 #define RTC_TRACE_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_TRACE, str)
611 #define RTC_VERBOSE(fmt) RTC_LOG(::RTC::Logger::RTL_VERBOSE, fmt)
612 #define RTC_VERBOSE_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_VERBOSE, str)
633 #define RTC_PARANOID(fmt) RTC_LOG(::RTC::Logger::RTL_PARANOID, fmt)
634 #define RTC_PARANOID_STR(str) RTC_LOG_STR(::RTC::Logger::RTL_PARANOID, str)
637 #define RTC_FATAL(fmt)
638 #define RTC_FATAL_STR(str)
639 #define RTC_ERROR(fmt)
640 #define RTC_ERROR_STR(str)
641 #define RTC_WARN(fmt)
642 #define RTC_WARN_STR(str)
643 #define RTC_INFO(fmt)
644 #define RTC_INFO_STR(str)
645 #define RTC_DEBUG(fmt)
646 #define RTC_DEBUG_STR(str)
647 #define RTC_TRACE(fmt)
648 #define RTC_TRACE_STR(str)
649 #define RTC_VERBOSE(fmt)
650 #define RTC_VERBOSE_STR(str)
651 #define RTC_PARANOID(fmt)
652 #define RTC_PARANOID_STR(str)
657 #endif // RTC_SYSTEMLOGGER_H
@ RTL_WARN
Definition: SystemLogger.h:108
int strToLevel(const char *level)
ログレベル設定 与えられた文字列に対応したログレベルを設定する。
void setClockType(std::string clocktype)
ログ記録時に使用するクロックを指定する
@ RTL_VERBOSE
Definition: SystemLogger.h:112
log_stream テンプレートクラス
Definition: Logger.h:540
void disableEscapeSequence()
エスケープシーケンスを無効にする
@ RTL_TRACE
Definition: SystemLogger.h:111
Definition: ClockManager.h:52
@ RTL_ERROR
Definition: SystemLogger.h:107
void setDateFormat(const char *format)
ヘッダに付加する日時フォーマットを指定する。
log_streambuf and log_stream class
virtual void header(int level)
メッセージのプリフィックス追加関数
void enableEscapeSequence()
エスケープシーケンスを有効にする
Logger クラス
Definition: SystemLogger.h:99
::coil::LogStreamBuffer LogStreamBuf
Definition: SystemLogger.h:34
std::string getDate(void)
フォーマットされた現在日時文字列を取得する。 指定された書式で記述しã...
@ RTL_PARANOID
Definition: SystemLogger.h:113
@ RTL_DEBUG
Definition: SystemLogger.h:110
virtual ~Logger(void)
仮想デストラクタ
@ RTL_INFO
Definition: SystemLogger.h:109
::coil::LogStream LogStream
Definition: SystemLogger.h:35
void setName(const char *name)
ヘッダの日時の後に付加する文字列を設定する。
@ RTL_FATAL
Definition: SystemLogger.h:106
log_streambuf テンプレートクラス
Definition: Logger.h:54
log_streambuf< char > LogStreamBuffer
Definition: Logger.h:932
ostream_type & level(int level)
ログストリームの取得
Definition: Logger.h:732
@ RTL_SILENT
Definition: SystemLogger.h:105
Global clock management class
bool setLevel(const char *level)
ログレベルを文字列で設定する
Logger(const char *name="")
コンストラクタ