if (l > _level) {
return;
}
-
+
time_t t;
time (&t);
string a = ctime (&t);
do_log (s.str ());
}
+void
+Log::microsecond_log (string m, Level l)
+{
+ boost::mutex::scoped_lock lm (_mutex);
+
+ if (l > _level) {
+ return;
+ }
+
+ struct timeval tv;
+ gettimeofday (&tv, 0);
+
+ stringstream s;
+ s << tv.tv_sec << ":" << tv.tv_usec << " " << m;
+ do_log (s.str ());
+}
+
void
Log::set_level (Level l)
{