Add sinces
[lttng-docs.git] / contents / using-lttng / instrumenting / proc-lttng-logger-abi.md
1 ---
2 id: proc-lttng-logger-abi
3 since: 2.5
4 ---
5
6 The `lttng-tracer` Linux kernel module, installed by the LTTng-modules
7 package, creates a special LTTng logger ABI file `/proc/lttng-logger`
8 when loaded. Writing text data to this file generates an LTTng kernel
9 domain event named `lttng_logger`.
10
11 Unlike other kernel domain events, `lttng_logger` may be enabled by
12 any user, not only root users or members of the tracing group.
13
14 To use the LTTng logger ABI, simply write a string to
15 `/proc/lttng-logger`:
16
17 <pre class="term">
18 echo -n 'Hello, World!' > /proc/lttng-logger
19 </pre>
20
21 The `msg` field of the `lttng_logger` event contains the recorded
22 message.
23
24 <div class="tip">
25 <p>
26 <span class="t">Note:</span>Messages are split in chunks of
27 1024&nbsp;bytes.
28 </p>
29 </div>
30
31 The LTTng logger ABI is a quick and easy way to trace some events from
32 user space through the kernel tracer. However, it is much more basic
33 than LTTng-UST: it's slower (involves system call round-trip to the
34 kernel and only supports logging strings). The LTTng logger ABI is
35 particularly useful for recording logs as LTTng traces from shell
36 scripts, potentially combining them with other Linux kernel/user space
37 events.
This page took 0.029967 seconds and 4 git commands to generate.