diff --git a/.hgignore b/.hgignore index 9b4c464..ea86dde 100644 --- a/.hgignore +++ b/.hgignore @@ -9,3 +9,5 @@ test_adapter lib local.conf build/ +# Default ignored files +.idea/workspace.xml diff --git a/Adapter.cc b/Adapter.cc index cd213f9..b9ee427 100644 --- a/Adapter.cc +++ b/Adapter.cc @@ -6,6 +6,7 @@ #include #include #include "status_to_string.hh" +#include "pEpLog.hh" using namespace std; diff --git a/Adapter.hh b/Adapter.hh index d22b5cb..55bc101 100644 --- a/Adapter.hh +++ b/Adapter.hh @@ -8,14 +8,6 @@ #include #include -// TODO: put into not yet existing libpEpAdapter_utils.h, to be across whole libpEpAdapter -#ifdef NDEBUG - #define pEpLog(msg) do{}while(0) -#else - #include - #define pEpLog(msg) do{std::cerr << __FILE__ << "::" << __FUNCTION__ << " - " << msg << '\n';} while(0) -#endif - namespace pEp { // throws std::bad_alloc if status==PEP_OUT_OF_MEMORY, diff --git a/Adapter.hxx b/Adapter.hxx index 73947dc..8632953 100644 --- a/Adapter.hxx +++ b/Adapter.hxx @@ -6,6 +6,7 @@ #include #include "locked_queue.hh" #include +#include "pEpLog.hh" namespace pEp { namespace Adapter { diff --git a/pEpLog.hh b/pEpLog.hh new file mode 100644 index 0000000..12937e1 --- /dev/null +++ b/pEpLog.hh @@ -0,0 +1,7 @@ +// TODO: put into not yet existing libpEpAdapter_utils.h, to be across whole libpEpAdapter +#ifdef NDEBUG + #define pEpLog(msg) do{}while(0) +#else + #include + #define pEpLog(msg) do{std::cerr << __FILE__ << "::" << __FUNCTION__ << " - " << msg << '\n';} while(0) +#endif \ No newline at end of file diff --git a/test/test_adapter.cc b/test/test_adapter.cc index 75e78c0..b0c6e5a 100644 --- a/test/test_adapter.cc +++ b/test/test_adapter.cc @@ -6,6 +6,7 @@ #include #include #include +#include "pEpLog.hh" using namespace std; using namespace pEp::Adapter; diff --git a/test/test_adapter_cxx.cc b/test/test_adapter_cxx.cc index e44a2ed..fd33314 100644 --- a/test/test_adapter_cxx.cc +++ b/test/test_adapter_cxx.cc @@ -6,6 +6,7 @@ #include #include #include +#include "pEpLog.hh" using namespace pEp::Adapter;