X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=doc%2Fexamples%2Fdemo-tracelog%2FREADME;fp=doc%2Fexamples%2Fdemo-tracelog%2FREADME;h=46fe7679c6e9736470f67f66fa449d34c9c47b3e;hb=eb8246a0e43cf5a762dfeb47746c8788f8594277;hp=0000000000000000000000000000000000000000;hpb=0cb03c850dedb8f1e7f11e2e47764aa4d3ba313b;p=lttng-ust.git diff --git a/doc/examples/demo-tracelog/README b/doc/examples/demo-tracelog/README new file mode 100644 index 00000000..46fe7679 --- /dev/null +++ b/doc/examples/demo-tracelog/README @@ -0,0 +1,20 @@ +This is a demo application showing how to trace logging statements into +LTTng-UST. + +The simplest commands to trace the demo program are: + +lttng create +lttng enable-event -u "lttng_ust_tracelog:*" +lttng start +./demo-tracelog +lttng stop +lttng view +lttng destroy + +The resulting lttng view output should look like this: + +[15:54:19.454863179] (+?.?????????) thinkos lttng_ust_tracelog:err: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 0" } +[15:54:19.454871660] (+0.000008481) thinkos lttng_ust_tracelog:err: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 1" } +[15:54:19.454872838] (+0.000001178) thinkos lttng_ust_tracelog:err: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 2" } +[15:54:19.454873541] (+0.000000703) thinkos lttng_ust_tracelog:err: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 3" } +[15:54:19.454874283] (+0.000000742) thinkos lttng_ust_tracelog:err: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 4" }