diff --git a/src/sdk/example/example.cpp b/src/sdk/example/example.cpp index 335bb63e9..ad7905e35 100644 --- a/src/sdk/example/example.cpp +++ b/src/sdk/example/example.cpp @@ -73,8 +73,25 @@ void produce() int main() { + // this is needed before using any part of the api utils::init_spark_lib(); - LOG(md, Info, "Hello world"); + + // this is how we log, the first arg is the subsystem, md in your + // case the second is the log level: Diag, Info, Warn, Error, Fatal + // the third argument is a format string, followed by arguments + // (this uses the fmt library see here: https://github.com/fmtlib/fmt + LOG(md, Info, "Hello world, my pid is: {}",getpid()); + + // this is the tracing library we use for performance tuning. + // first two args are special markers just use them as is second + // arg is a const char *, next 3 args are long long see + // https://lttng.org/ for details + tracepoint (bts_trace,trace_order,(char*) "This is a trace example", 0,0, 0); + + // this is an example of our assert macro + bts_assert(true); + + produce(); utils::finit_spark_lib(); return 0;