From 05a7d9f61caeb4fa8a6eb2ba8993e0db635ba4f1 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 May 2015 22:25:02 +0300 Subject: [PATCH 1/6] fixed travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8cf9a9ae..85eb8491 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,7 +136,7 @@ install: script: - ./"${BIN}" - valgrind --trace-children=yes --leak-check=full ./"${BIN}" - - cd tests; make rebuild; ./tests + - cd $CHECKOUT_PATH/tests; make rebuild; ./tests notifications: email: false From 19a2abaab8c56a8f18ed3710de424fda4e2dea02 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 May 2015 22:47:05 +0300 Subject: [PATCH 2/6] fixed travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 85eb8491..6018b7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -107,7 +107,7 @@ before_install: - which $CXX - which $CC - which valgrind - - if [ -n "$CLANG_VERSION" ]; then sudo CXX=$CXX CC=$CC .tests/install_libcxx.sh; fi + - if [ -n "$CLANG_VERSION" ]; then sudo CXX=$CXX CC=$CC ./tests/install_libcxx.sh; fi install: - cd $CHECKOUT_PATH From d0f145f0094596a666d5b64904d9177dd906753c Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 May 2015 22:54:07 +0300 Subject: [PATCH 3/6] fixed tests make file --- tests/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index fc428a9b..5f841a85 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,6 +1,6 @@ CXX ?= g++ -CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -Wl,--no-as-needed -O2 -LDPFALGS = -pthread -flto +CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -O2 +LDPFALGS = -pthread CPP_FILES := $(wildcard *.cpp) OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o))) @@ -10,7 +10,7 @@ tests: $(OBJ_FILES) $(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^ %.o: %.cpp - g++ $(CXXFLAGS) -c -o $@ $< + $(CXX) $(CXXFLAGS) -c -o $@ $< clean: rm -f tests *.o logs/* From 319a62d73f0d6fd8262c606b071499be26f472b1 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 May 2015 23:04:09 +0300 Subject: [PATCH 4/6] fixed tests makefile --- tests/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 5f841a85..5be7be50 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,15 +5,16 @@ LDPFALGS = -pthread CPP_FILES := $(wildcard *.cpp) OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o))) - -tests: $(OBJ_FILES) + +tests: $(OBJ_FILES) $(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^ + mkdir -p logs %.o: %.cpp $(CXX) $(CXXFLAGS) -c -o $@ $< clean: - rm -f tests *.o logs/* + rm -f tests *.o logs/*.txt rebuild: clean tests From 51f69dfcca1d7ba8d81a1fdbb4b0e1d9dcf7e24e Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 2 Jun 2015 13:01:24 -0700 Subject: [PATCH 5/6] Expose line_logger enabled state to support custom operator<<'s --- include/spdlog/details/line_logger.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/spdlog/details/line_logger.h b/include/spdlog/details/line_logger.h index 3a946cb6..da121c11 100644 --- a/include/spdlog/details/line_logger.h +++ b/include/spdlog/details/line_logger.h @@ -206,6 +206,11 @@ public: _enabled = false; } + bool is_enabled() + { + return _enabled; + } + private: logger* _callback_logger; From ba1de0abb298826eb5ca37e3bc502e9088cb7d7e Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 2 Jun 2015 14:38:11 -0700 Subject: [PATCH 6/6] make is_enabled() const --- include/spdlog/details/line_logger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/line_logger.h b/include/spdlog/details/line_logger.h index da121c11..80d7cc13 100644 --- a/include/spdlog/details/line_logger.h +++ b/include/spdlog/details/line_logger.h @@ -206,7 +206,7 @@ public: _enabled = false; } - bool is_enabled() + bool is_enabled() const { return _enabled; }