diff options
author | Christian Pointner <equinox@anytun.org> | 2009-10-04 15:09:54 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-10-04 15:09:54 +0000 |
commit | ca59905ebfc609b8387f42b96387f825f13aab36 (patch) | |
tree | dd7f47de4e7669e6ccdeb43ec03748c5cfba06d3 /src | |
parent | small cleanup (diff) |
logtargets valgrind cleanup
Diffstat (limited to 'src')
-rwxr-xr-x | src/configure | 2 | ||||
-rw-r--r-- | src/logTargets.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/configure b/src/configure index 770318b..4d601af 100755 --- a/src/configure +++ b/src/configure @@ -33,7 +33,7 @@ TARGET=`uname -s` CXXFLAGS='-g -Wall -O2 -DLOG_SYSLOG -DLOG_FILE -DLOG_STDOUT' -LDFLAGS='-g -Wall -O2 -lboost_thread -lboost_serialization -lboost_system' +LDFLAGS='-g -Wall -O2 -lboost_thread -lboost_serialization -lboost_system -lboost_date_time' CRYPTO_LIB='gcrypt' PASSPHRASE=1 diff --git a/src/logTargets.cpp b/src/logTargets.cpp index 898340b..4420f1d 100644 --- a/src/logTargets.cpp +++ b/src/logTargets.cpp @@ -328,7 +328,8 @@ void LogTargetFile::log(std::string msg, int prio) if(!opened) return; - logfile << boost::posix_time::second_clock::local_time() << " " << Log::prioToString(prio) << ": " << msg << std::endl; + std::string timestamp = boost::posix_time::to_simple_string(boost::posix_time::second_clock::local_time()); + logfile << timestamp << " " << Log::prioToString(prio) << ": " << msg << std::endl; } LogTargetFile& LogTargetFile::setLogFilename(std::string l) @@ -368,7 +369,8 @@ void LogTargetStdout::log(std::string msg, int prio) if(!opened) return; - stream << boost::posix_time::second_clock::local_time() << " " << Log::prioToString(prio) << ": " << msg << std::endl; + std::string timestamp = boost::posix_time::to_simple_string(boost::posix_time::second_clock::local_time()); + stream << timestamp << " " << Log::prioToString(prio) << ": " << msg << std::endl; } #endif |