doc: implement REUSE with SPDX identifiers
[lttng-ust.git] / doc / examples / demo-tracelog / README.md
CommitLineData
53f7d0d7
MJ
1<!--
2SPDX-FileCopyrightText: 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3
4SPDX-License-Identifier: CC-BY-4.0
5-->
6
eb8246a0
MD
7This is a demo application showing how to trace logging statements into
8LTTng-UST.
9
10The simplest commands to trace the demo program are:
11
53f7d0d7 12```
eb8246a0
MD
13lttng create
14lttng enable-event -u "lttng_ust_tracelog:*"
15lttng start
16./demo-tracelog
17lttng stop
18lttng view
19lttng destroy
53f7d0d7 20```
eb8246a0
MD
21
22The resulting lttng view output should look like this:
23
53f7d0d7 24```
c4d667ed
MD
25[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" }
26[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" }
27[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" }
28[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" }
29[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" }
53f7d0d7 30```
This page took 0.029918 seconds and 4 git commands to generate.