X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=doc%2Fman%2Ftracelog.3.txt;h=1281ce7c8d940d5ec35d26055e3ed13d8c2fc3af;hb=0fd0de100bc6633e8ecf575301dc92321db32575;hp=43ba934befc1ed79ac30a2b6d2bec1918459d1d9;hpb=0810c65b69a2b2f18d1c2f0e32c3d9ab92a49867;p=lttng-ust.git diff --git a/doc/man/tracelog.3.txt b/doc/man/tracelog.3.txt index 43ba934b..1281ce7c 100644 --- a/doc/man/tracelog.3.txt +++ b/doc/man/tracelog.3.txt @@ -47,13 +47,21 @@ command. The `tracelog()` events contain the following fields: [options="header"] -|=============================================================== -| Field name | Description -| `line` | Line in source file where `tracelog()` was called -| `file` | Source file from which `tracelog()` was called -| `func` | Function name from which `tracelog()` was called -| `msg` | Formatted string output -|=============================================================== +|=== +|Field name |Description + +|`line` +|Line in source file where `tracelog()` was called. + +|`file` +|Source file from which `tracelog()` was called. + +|`func` +|Function name from which `tracelog()` was called. + +|`msg` +|Formatted string output. +|=== If you do not need to attach a specific log level to a `tracelog()` call, use man:tracef(3) instead. @@ -96,43 +104,43 @@ This C source file, saved as `app.c`, can be compiled into a program like this: [role="term"] ---------------------------- -cc -o app app.c -llttng-ust ---------------------------- +---- +$ cc -o app app.c -llttng-ust +---- You can create an LTTng tracing session, enable all the `tracelog()` events, and start the created tracing session like this: [role="term"] ---------------------------------------------------- -lttng create my-session -lttng enable-event --userspace 'lttng_ust_tracelog:*' -lttng start ---------------------------------------------------- +---- +$ lttng create my-session +$ lttng enable-event --userspace 'lttng_ust_tracelog:*' +$ lttng start +---- Or you can enable `tracelog()` events matching a log level at least as severe as a given log level: [role="term"] -------------------------------------------------------- -lttng enable-event --userspace 'lttng_ust_tracelog:*' \ +---- +$ lttng enable-event --userspace 'lttng_ust_tracelog:*' \ --loglevel=TRACE_INFO -------------------------------------------------------- +---- Next, start the program to be traced: [role="term"] ------------------------------------------------- -./app a few arguments passed to this application ------------------------------------------------- +---- +$ ./app a few arguments passed to this application +---- Finally, stop the tracing session, and inspect the recorded events: [role="term"] ----------- -lttng stop -lttng view ----------- +---- +$ lttng stop +$ lttng view +---- [[limitations]]