Added more code to SDK example.
This commit is contained in:
1 parent
4875a6db25
commit
9bdec8c552
1 file changed
+18
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user