Move pEpLog() macro to new header pEpLog.hh

sync Release_2.0.0
heck 3 years ago
parent a62e51bec8
commit b7d8c06d79

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

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

@ -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,

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

@ -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

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

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

Loading…
Cancel
Save