the logging uses an external library, which is currently present in blackbox as submodule.

there are two new additions to source tree:

3rd_party/flogging

this is the external library. the important part for blackbox is 3rd_party/flogging/trace_client

3rd_party/logging

this is the wrapper on the top of flogging library that will be included in files. it contains:

3rd_party/logging/logging.h

this is the include that will be included in files that are using logging

3rd_party/logging/server/trace_server.exe

server for receiving log messages

2) How the ... i use it

1. enable logging in the top-level CMakeLists.txt by removing the comment # character on the line

set(USE_LOGGING 1)

2. include logging.h in your file. the path to logging shoud be added by cmake, so you do not need to specify full path

#include <logging.h>

3. run server. you can find a copy in

3rd_party/logging/server/trace_server.exe

4. run client (blackbox)

2) How the ... i use it from code

There are few macros in the library that are important.

2.1) initializing/setup macros

usual sequence in main.cpp is

TRACE_APPNAME("BlackBox");TRACE_CONNECT();

sometimes these comes handy:

following line turns on or off buffering. buffering in off means, that the messages will be sent synchronously, i.e. the client waits until the message is sent. it's good when your client crashes and you do not want to loose the messages in buffer. but un-buffered mode is slower than buffered.