69 |
|
|
70 |
ostringstream out; |
ostringstream out; |
71 |
|
|
72 |
out << Months[ now.tm_mon ] << " " << setw(2) << setfill('0') << now.tm_mday; |
|
73 |
|
out << (1900+now.tm_year) << "-" << setw(2) << setfill('0') << (now.tm_mon+1) << "-" << setw(2) << setfill('0') << now.tm_mday; |
74 |
out << " " << setw(2) << setfill('0') << now.tm_hour; |
out << " " << setw(2) << setfill('0') << now.tm_hour; |
75 |
out << ":" << setw(2) << setfill('0') << now.tm_min; |
out << ":" << setw(2) << setfill('0') << now.tm_min; |
76 |
out << ":" << setw(2) << setfill('0') << now.tm_sec; |
out << ":" << setw(2) << setfill('0') << now.tm_sec; |
103 |
syslog(LOG_INFO, "%s", msg.c_str()); |
syslog(LOG_INFO, "%s", msg.c_str()); |
104 |
} |
} |
105 |
} |
} |
106 |
|
|
107 |
|
std::string getLog() |
108 |
|
{ |
109 |
|
std::ostringstream oss; |
110 |
|
for (unsigned i=0; i<logBuffer.size(); i++) { |
111 |
|
oss << logBuffer[i]; |
112 |
|
} |
113 |
|
|
114 |
|
return oss.str(); |
115 |
|
} |
116 |
} |
} |