16 #ifndef RPL_REPORTING_H
17 #define RPL_REPORTING_H
24 #define MAX_SLAVE_ERRMSG 1024
27 #if !defined(EMBEDDED_LIBRARY)
60 virtual void report(loglevel
level,
int err_code,
const char *
msg, ...) const
61 ATTRIBUTE_FORMAT(printf, 4, 5);
62 void va_report(loglevel level,
int err_code, const
char *prefix_msg,
63 const
char *msg, va_list v_args) const;
75 #if !defined(EMBEDDED_LIBRARY)
80 #endif // EMBEDDED_LIBRARY
101 void update_timestamp()
108 localtime_r(&skr, &tm_tmp);
111 sprintf(
timestamp,
"%02d%02d%02d %02d:%02d:%02d",
112 start->tm_year % 100,
129 Error const& last_error()
const {
return m_last_error; }
130 bool is_error()
const {
return last_error().
number != 0; }
136 virtual void do_report(loglevel
level,
int err_code,
137 const char *
msg, va_list v_args)
const
139 va_report(level, err_code, NULL, msg, v_args);
146 mutable Error m_last_error;
148 char const *
const m_thread_name;
155 #endif // RPL_REPORTING_H