Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / Logger / IOStreamTarget.cc
index 487e508..7394455 100644 (file)
@@ -39,7 +39,7 @@
 ///////////////////////////////////////////////////////////////////////////
 // senf::log::IOStreamTarget
 
-const char * const senf::log::IOStreamTarget::LEVELNAMES_[8] = {
+char const * const senf::log::IOStreamTarget::LEVELNAMES_[8] = {
         "NONE", "VERBOSE", "NOTICE", "MESSAGE", "IMPORTANT", "CRITICAL", "FATAL", "DISABLED" };
 
 prefix_ senf::log::IOStreamTarget::IOStreamTarget(std::ostream & os)
@@ -71,10 +71,10 @@ prefix_ void senf::log::IOStreamTarget::v_write(time_type timestamp,
     char sep (' ');
 
     for (; i != i_end; ++i) {
-        stream_ << timestamp << sep;
+        stream_ << senf::ClockService::abstime(timestamp) << sep;
         stream_ << "[" << LEVELNAMES_[level] << "]";
         if (area != "senf::log::DefaultArea")
-            stream_ << "[" << area << "]";
+            stream_ << " [" << area << "]";
         stream_ << " " << *i << "\n";
         sep = '-';
     }