add Nulllogger to suppress console output.

JSON-15
Roker 6 years ago
parent f57dfd119e
commit a303d12b2c

@ -13,7 +13,7 @@ endif
else
CXXFLAGS = -I$(HOME)/include -I$(HOME)/local/include/ -Ijson_spirit
LDFLAGS = -L$(HOME)/lib -L$(HOME)/local/lib -lpthread -levent -lpEpEngine -luuid -lgpgme-pthread -letpan -lboost_system -lboost_filesystem
LDFLAGS = -L$(HOME)/lib -L$(HOME)/local/lib -lpthread -levent -lpEpEngine -luuid -lgpgme-pthread -letpan -lboost_system -lboost_filesystem -lboost_program_options
endif
@ -29,6 +29,7 @@ libjson-adapter.a: json-adapter.o registry.o nfc.o json_rpc.o \
function_map.o pep-types.o \
security-token.o \
nfc_sets.o base64.o \
nulllogger.o \
json_spirit/json_spirit_reader.o json_spirit/json_spirit_value.o json_spirit/json_spirit_writer.o
ar rcs $@ $^

@ -0,0 +1,11 @@
#include "nulllogger.hh"
class NullBuffer : public std::streambuf
{
public:
virtual int sync() { return 0; }
};
NullBuffer nullbuffer;
std::ostream nulllogger(&nullbuffer);

@ -0,0 +1,8 @@
#ifndef NULL_LOGGER_HH
#define NULL_LOGGER_HH
#include <ostream>
extern std::ostream nulllogger;
#endif
Loading…
Cancel
Save