domain: add Python domain to list
[lttng-docs.git] / contents / using-lttng / instrumenting / c-application / tracef.md
index b4a9428bcbcf148e1ca5854ba3ac9290cdfa2e0f..1ec93c2674f6987351ca01124f16ebcc760374b8 100644 (file)
@@ -1,5 +1,6 @@
 ---
 id: tracef
+since: 2.5
 ---
 
 `tracef()` is a small LTTng-UST API to avoid defining your own
@@ -11,7 +12,7 @@ super simple, albeit with notable disadvantages compared to custom,
 full-fledged tracepoint providers:
 
   * All generated events have the same provider/event names, respectively
-    `lttng-ust-tracef` and `event`.
+    `lttng_ust_tracef` and `event`.
   * There's no static type checking.
   * The only event field you actually get, named `msg`, is a string
     potentially containing the values you passed to the function
@@ -34,7 +35,8 @@ where you need to insert probes:
 #include <lttng/tracef.h>
 ~~~
 
-Use `tracef()` like you would use `printf()` in your source code, e.g.:
+Use `tracef()` like you would use `printf()` in your source code, for
+example:
 
 ~~~ c
     /* ... */
@@ -57,4 +59,9 @@ Execute the application as usual:
 </pre>
 
 VoilĂ ! Use the `lttng` command line tool to
-[control tracing](#doc-controlling-tracing).
+[control tracing](#doc-controlling-tracing). You can enable `tracef()`
+events like this:
+
+<pre class="term">
+lttng enable-event --userspace 'lttng_ust_tracef:*'
+</pre>
This page took 0.024783 seconds and 4 git commands to generate.