X-Git-Url: https://git.lttng.org/?p=lttng-ust.git;a=blobdiff_plain;f=doc%2Fexamples%2Fdemo-tracelog%2FREADME.md;fp=doc%2Fexamples%2Fdemo-tracelog%2FREADME.md;h=730834c95e84acf9b48fe44921eb99081295c08b;hp=0000000000000000000000000000000000000000;hb=53f7d0d7404de911dd62dff06f08539e33ea7519;hpb=1c1968450409b3c159a3000f9e1a968ff1e5f7e8 diff --git a/doc/examples/demo-tracelog/README.md b/doc/examples/demo-tracelog/README.md new file mode 100644 index 00000000..730834c9 --- /dev/null +++ b/doc/examples/demo-tracelog/README.md @@ -0,0 +1,30 @@ + + +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:TRACE_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:TRACE_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:TRACE_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:TRACE_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:TRACE_ERR: { cpu_id = 0 }, { line = 45, file = "demo-tracelog.c", func = "main", _msg_length = 17, msg = "Error condition 4" } +```