70 out << server <<
": Changed state to " << state <<
" '" << msg <<
"' received.";
110 if (severity==
kAlarm && txt.length()==0)
114 const lock_guard<mutex> guard(mtx);
128 fOut << time.
GetAsStr(
"%H:%M:%S.%f") <<
" - " << txt << endl;
135 const uint32_t mjd = time.
Mjd();
138 WriteImp(time,
"=================== "+time.
GetAsStr(
"%Y-%m-%d")+
" ["+to_string(mjd)+
"] ==================");
A warning, things that somehow might result in unexpected or unwanted bahaviour.
void StateChanged(const Time &time, const std::string &server, const std::string &msg, int state)
Adds some functionality to boost::posix_time::ptime for our needs.
int WriteImp(const Time &time, const std::string &txt, int qos=kMessage)
Mjd of last message.
An info telling something which can be interesting to know.
Just a message, usually obsolete.
virtual int Write(const Time &time, const std::string &txt, int qos=kMessage)
A message used for debugging only.
uint32_t fLastMjd
The ostream to which by default Write redirects its output.
int Update(const std::string &txt, int severity=kMessage)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
MessageImp(std::ostream &out=std::cout)
Error, something unexpected happened, but can still be handled by the program.
A comment which is always printed.
Error, something unexpected happened, but needs user intervention (i.e. it needs a signal to the user...
virtual void IndicateStateChange(const Time &, const std::string &)
std::string GetAsStr(const char *fmt="%Y-%m-%d %H:%M:%S") const
An error which cannot be handled at all happend, the only solution is program termination.