Browse Source

Move pEpLog() macro to new header pEpLog.hh

sync Release_2.0.0
heck 2 years ago
parent
commit
b7d8c06d79
7 changed files with 13 additions and 8 deletions
  1. +2
    -0
      .hgignore
  2. +1
    -0
      Adapter.cc
  3. +0
    -8
      Adapter.hh
  4. +1
    -0
      Adapter.hxx
  5. +7
    -0
      pEpLog.hh
  6. +1
    -0
      test/test_adapter.cc
  7. +1
    -0
      test/test_adapter_cxx.cc

+ 2
- 0
.hgignore View File

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

+ 1
- 0
Adapter.cc View File

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


+ 0
- 8
Adapter.hh View File

@ -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
- 0
Adapter.hxx View File

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


+ 7
- 0
pEpLog.hh View File

@ -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
- 0
test/test_adapter.cc View File

@ -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
- 0
test/test_adapter_cxx.cc View File

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


Loading…
Cancel
Save