From 456771135e77e43884d9c838f963ad3fb5c0f471 Mon Sep 17 00:00:00 2001 From: Stephen Roderick Date: Thu, 19 May 2011 04:41:45 -0400 Subject: [PATCH] logging: Correctly copy timestamp --- logging/LoggingEvent.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/logging/LoggingEvent.cpp b/logging/LoggingEvent.cpp index c6f454b..c88e00d 100644 --- a/logging/LoggingEvent.cpp +++ b/logging/LoggingEvent.cpp @@ -13,7 +13,8 @@ LoggingEvent::LoggingEvent() : message(""), ndc(""), priority(log4cpp::Priority::NOTSET), - threadName("") + threadName(""), + timeStamp() { } @@ -22,7 +23,8 @@ LoggingEvent::LoggingEvent(const LoggingEvent& toCopy) : message(toCopy.message), ndc(toCopy.ndc), priority(toCopy.priority), - threadName(toCopy.threadName) + threadName(toCopy.threadName). + timeStamp(toCopy.timeStamp) { } @@ -34,7 +36,8 @@ LoggingEvent::LoggingEvent(const rt_string& categoryName, message(message), ndc(ndc), priority(priority), - threadName("") + threadName(""), + timeStamp() { char buffer[16]; threadName = log4cpp::threading::getThreadId(&buffer[0]); @@ -49,6 +52,7 @@ const LoggingEvent& LoggingEvent::operator=(const LoggingEvent& rhs) ndc = rhs.ndc; priority = rhs.priority; threadName = rhs.threadName; + timeStamp = rhs.timeStamp; } return *this; } -- 1.7.4.4