From 05fa6757ce0e61a4ae8f10a510a15f2c79ecccd8 Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Sun, 17 Aug 2014 07:35:09 +0200 Subject: [PATCH] Adding timestamp to logger. --- Log.cpp | 2 ++ Makefile.bsd | 4 ++-- Makefile.linux | 8 ++++---- Makefile.osx | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Log.cpp b/Log.cpp index 3f50d23a..8ab9380e 100644 --- a/Log.cpp +++ b/Log.cpp @@ -1,9 +1,11 @@ #include "Log.h" +#include Log * g_Log = nullptr; void LogMsg::Process() { + output << boost::posix_time::second_clock::local_time() << " - "; output << s.str(); } diff --git a/Makefile.bsd b/Makefile.bsd index f78dc826..be8396e6 100644 --- a/Makefile.bsd +++ b/Makefile.bsd @@ -2,8 +2,8 @@ CC = g++ CFLAGS = -std=c++11 -O2 include filelist.mk INCFLAGS = -I/usr/include/ -I/usr/local/include/ -LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lpthread -LIBS = +LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread +LIBS = all: obj i2p diff --git a/Makefile.linux b/Makefile.linux index 2ebc1889..0d5feb37 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -2,12 +2,12 @@ CC = g++ CFLAGS = -g -Wall -std=c++0x include filelist.mk -INCFLAGS = -LDFLAGS = -Wl,-rpath,/usr/local/lib -lcryptopp -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lpthread -LIBS = +INCFLAGS = +LDFLAGS = -Wl,-rpath,/usr/local/lib -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread +LIBS = #check if AES-NI is supported by CPU -ifneq ($(shell grep -c aes /proc/cpuinfo),0) +ifneq ($(shell grep -c aes /proc/cpuinfo),0) CPU_FLAGS = -DAESNI endif diff --git a/Makefile.osx b/Makefile.osx index 1c48d2a6..5aa22e52 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -2,8 +2,8 @@ CC = clang++ CFLAGS = -g -Wall -std=c++11 -lstdc++ -I/usr/local/include include filelist.mk INCFLAGS = -DCRYPTOPP_DISABLE_ASM -LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lpthread -LIBS = +LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread +LIBS = # OSX Notes # http://www.hutsby.net/2011/08/macs-with-aes-ni.html