diff --git a/tile/base/internal/logging.cc b/tile/base/internal/logging.cc index b016424..e124f12 100644 --- a/tile/base/internal/logging.cc +++ b/tile/base/internal/logging.cc @@ -1,12 +1,16 @@ #include "tile/base/internal/logging.h" #include -#include #include #include #include #include #include +#ifdef NDEBUG +#undef NDEBUG +#endif +#include + namespace tile { namespace internal { namespace logging { @@ -498,7 +502,7 @@ LogToSinks(LogSeverity severity, sink->Send(severity, full_filename, base_filename, line, time, message, message_len); } catch (const std::exception &e) { fprintf(stderr, "\nLogSink[name=%s], reason=%s\n", sink->name(), e.what()); - std::abort(); + assert(false && "Send log to LogSink Failed"); } } } @@ -513,7 +517,7 @@ WaitForSinks() sink->Flush(); } catch (const std::exception &e) { fprintf(stderr, "\nLogSink[name=%s], reason=%s\n", sink->name(), e.what()); - std::abort(); + assert(false && "Send log to LogSink Failed"); } } }