From e08c6bf3ffb84cb040729ca9b31a812c62e4437e Mon Sep 17 00:00:00 2001 From: Mislav Bradac <mislav.bradac@memgraph.io> Date: Wed, 12 Jul 2017 12:44:21 +0200 Subject: [PATCH] Add cppitertools to ycm, small changes in loogging Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D541 --- .ycm_extra_conf.py | 2 ++ src/memgraph_bolt.cpp | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py index fdf5171f3..0f0df793a 100644 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -25,6 +25,8 @@ BASE_FLAGS = [ '-I./libs/googletest/googletest/include', '-I./libs/googletest/googlemock/include', '-I./libs/benchmark/include', + # We include cppitertools headers directly from libs directory. + '-I./libs', '-I./libs/rapidcheck/include', '-I./libs/antlr4/runtime/Cpp/runtime/src', '-I./build/libs/gflags/include' diff --git a/src/memgraph_bolt.cpp b/src/memgraph_bolt.cpp index 32084b9e1..282299e4b 100644 --- a/src/memgraph_bolt.cpp +++ b/src/memgraph_bolt.cpp @@ -113,17 +113,14 @@ int main(int argc, char **argv) { // Initialize socket. socket_t socket; if (!socket.Bind(endpoint)) { - LOG(ERROR) << "Cannot bind to socket on " << FLAGS_interface << " at " + LOG(FATAL) << "Cannot bind to socket on " << FLAGS_interface << " at " << FLAGS_port; - std::exit(EXIT_FAILURE); } if (!socket.SetNonBlocking()) { - LOG(ERROR) << "Cannot set socket to non blocking!"; - std::exit(EXIT_FAILURE); + LOG(FATAL) << "Cannot set socket to non blocking!"; } if (!socket.Listen(1024)) { - LOG(ERROR) << "Cannot listen on socket!"; - std::exit(EXIT_FAILURE); + LOG(FATAL) << "Cannot listen on socket!"; } Dbms dbms;