Browse Source

Move pEpLog() macro to new header pEpLog.hh

sync Release_2.0.0
heck 5 years ago
parent
commit
b7d8c06d79
  1. 2
      .hgignore
  2. 1
      Adapter.cc
  3. 8
      Adapter.hh
  4. 1
      Adapter.hxx
  5. 7
      pEpLog.hh
  6. 1
      test/test_adapter.cc
  7. 1
      test/test_adapter_cxx.cc

2
.hgignore

@ -9,3 +9,5 @@ test_adapter
lib
local.conf
build/
# Default ignored files
.idea/workspace.xml

1
Adapter.cc

@ -6,6 +6,7 @@
#include <iomanip>
#include <assert.h>
#include "status_to_string.hh"
#include "pEpLog.hh"
using namespace std;

8
Adapter.hh

@ -8,14 +8,6 @@
#include <pEp/sync_api.h>
#include <stdexcept>
// TODO: put into not yet existing libpEpAdapter_utils.h, to be across whole libpEpAdapter
#ifdef NDEBUG
#define pEpLog(msg) do{}while(0)
#else
#include <iostream>
#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,

1
Adapter.hxx

@ -6,6 +6,7 @@
#include <thread>
#include "locked_queue.hh"
#include <cassert>
#include "pEpLog.hh"
namespace pEp {
namespace Adapter {

7
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 <iostream>
#define pEpLog(msg) do{std::cerr << __FILE__ << "::" << __FUNCTION__ << " - " << msg << '\n';} while(0)
#endif

1
test/test_adapter.cc

@ -6,6 +6,7 @@
#include <assert.h>
#include <unistd.h>
#include <pEp/keymanagement.h>
#include "pEpLog.hh"
using namespace std;
using namespace pEp::Adapter;

1
test/test_adapter_cxx.cc

@ -6,6 +6,7 @@
#include <assert.h>
#include <unistd.h>
#include <pEp/keymanagement.h>
#include "pEpLog.hh"
using namespace pEp::Adapter;

Loading…
Cancel
Save