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