incremental
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 855fec2..ea50672 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
-SET(CMAKE_CXX_FLAGS_DEBUG "-O0")
-
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
message("${CMAKE_MODULE_PATH}")
diff --git a/crow/include/crow/http_connection.h b/crow/include/crow/http_connection.h
index d13f26e..5ead372 100644
--- a/crow/include/crow/http_connection.h
+++ b/crow/include/crow/http_connection.h
@@ -426,7 +426,6 @@
private:
void do_read() {
- CROW_LOG_DEBUG << "Foo0";
// auto self = this->shared_from_this();
is_reading = true;
adaptor_.socket().async_read_some(
@@ -435,41 +434,27 @@
std::size_t bytes_transferred) {
bool error_while_reading = true;
if (!ec) {
- CROW_LOG_DEBUG << "Foo1";
bool ret = parser_.feed(buffer_.data(), bytes_transferred);
if (ret && adaptor_.is_open()) {
- CROW_LOG_DEBUG << "Foo1";
error_while_reading = false;
}
- CROW_LOG_DEBUG << "FooA";
}
- CROW_LOG_DEBUG << "Foo3";
if (error_while_reading) {
- CROW_LOG_DEBUG << "Foo4";
cancel_deadline_timer();
- CROW_LOG_DEBUG << "Foo5";
parser_.done();
- CROW_LOG_DEBUG << "Foo6";
adaptor_.close();
is_reading = false;
CROW_LOG_DEBUG << this << " from read(1)";
check_destroy();
} else if (close_connection_) {
- CROW_LOG_DEBUG << "Foo7";
cancel_deadline_timer();
- CROW_LOG_DEBUG << "Foo8";
parser_.done();
- CROW_LOG_DEBUG << "Foo9";
is_reading = false;
- CROW_LOG_DEBUG << "Foo10";
check_destroy();
// adaptor will close after write
} else if (!need_to_call_after_handlers_) {
- CROW_LOG_DEBUG << "Foo11";
start_deadline();
- CROW_LOG_DEBUG << "Foo12";
do_read();
- CROW_LOG_DEBUG << "Foo12";
} else {
// res will be completed later by user
need_to_start_read_after_complete_ = true;
diff --git a/include/color_cout_g3_sink.hpp b/include/color_cout_g3_sink.hpp
index 5fb5bf4..1ea35d6 100644
--- a/include/color_cout_g3_sink.hpp
+++ b/include/color_cout_g3_sink.hpp
@@ -3,7 +3,7 @@
struct ColorCoutSink {
// Linux xterm color
// http://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal
- enum FG_Color { YELLOW = 33, RED = 31, GREEN = 32, WHITE = 97 };
+ enum FG_Color { YELLOW = 33, RED = 31, GREEN = 32, WHITE = 97, DEFAULT = 39 };
FG_Color GetColor(const LEVELS level) const {
if (level.value == WARNING.value) {
@@ -24,7 +24,7 @@
auto color = GetColor(level);
std::cout << "\033[" << color << "m" << logEntry.get().toString()
- << "\033[m";
+ << "\033[0m";
}
};
}
\ No newline at end of file