- _lengths.push_back (m.length ());
- emit (boost::bind (boost::ref (Appended), m));
- if (_lengths.size() > log_lines) {
- emit (boost::bind (boost::ref (Removed), _lengths.front()));
- _lengths.pop_front ();
+ time_t const s = entry->seconds ();
+ struct tm* local = localtime (&s);
+ if (
+ !_last_time ||
+ local->tm_yday != _last_time->tm_yday ||
+ local->tm_year != _last_time->tm_year ||
+ local->tm_hour != _last_time->tm_hour ||
+ local->tm_min != _last_time->tm_min
+ ) {
+ char buffer[64];
+ strftime (buffer, 64, "%c", local);
+ append (buffer);
+ }
+
+ append (entry->message ());
+ if (_log.size() > log_lines) {
+ emit (boost::bind (boost::ref (Removed), _log.front().length()));
+ _log.pop_front ();