BABELTRACE2-SINK.(7)
π NAME π
okay bestie, welcome to babeltrace2-sink.text.pretty β it's the Babeltrace 2 pretty-printing sink component class. yes that's a whole mouthful, we're gonna get through it together π«Ά (it lives in the Babeltrace 2 manual, section 7, iykyk)
β¨ DESCRIPTION β¨
A sink.text.pretty Babeltrace 2 component pretty-prints the events, discarded events, and discarded packets messages it consumes, and it sends them to the standard output or to a file. that's literally its whole job and it does it gorgeously π
+------------------+
| sink.text.pretty |
| +--> Pretty-printed messages to
Messages -->@ in | the standard output or a file and
+------------------+ to the standard error
if you wanna know more about the Babeltrace 2 project and its core concepts, go read babeltrace2-intro(7) β it's giving lore, go read it π
by default, a sink.text.pretty component pretty-prints to the standard output. but you can use the path parameter to make the component write to a file instead. your choice, main character πΈ
the component prints warnings on the standard error stream when it consumes a discarded events or discarded packets message. just a lil heads up, not a big deal π«Ά
if you don't use the path parameter and the standard output of the application is connected to a color-capable terminal, the component emits terminal color codes to enhance the text output. you can use the color parameter to force the color support or to disable it. slay β¨
this component class is equivalent to the text output format of babeltrace(1) (the Babeltrace 1 command-line tool). so like, the og vibes, but modernized π
π INITIALIZATION PARAMETERS π
clock-cycles=VAL[optional boolean] β ifVALis true, then print event times in clock cycles instead of hours, minutes, seconds, and nanoseconds.
Default: false.
clock-date=VAL[optional boolean] β ifVALis true, then print event times and dates.
Default: false.
clock-gmt=VAL[optional boolean] β ifVALis true, then print event times in the GMT time zone instead of the local time zone.
Default: false.
clock-seconds=VAL[optional boolean] β ifVALis true, then print event times in seconds instead of hours, minutes, seconds, and nanoseconds.
Default: false.
color=(never | auto | always)[optional string] β force the terminal color support. pick one bestie:auto(default) β only emit terminal color codes when the standard output and error streams are connected to a color-capable terminal.neverβ never emit terminal color codes. no color for you π«alwaysβ always emit terminal color codes. rainbow mode permanently π
the BABELTRACE_TERM_COLOR environment variable overrides this parameter. env var wins, periodt.
field-default=(show | hide)[optional string] β by default, show or hide all the fields. this sets the default value of all the parameters which start withfield-.field-emf=VAL[optional boolean] β show or hide the Eclipse Modeling Framework URI field of the event.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
False
field-loglevel=VAL[optional boolean] β show or hide the logging level field of the event.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
False
field-trace=VAL[optional boolean] β show or hide the trace name field.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
False
field-trace:domain=VAL[optional boolean] β show or hide the tracing domain field.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
False
field-trace:hostname=VAL[optional boolean] β show or hide the hostname field.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
True
field-trace:procname=VAL[optional boolean] β show or hide the process name field.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
True
field-trace:vpid=VAL[optional boolean] β show or hide the virtual process ID field.
Default, depending on the field-default parameter:
show:Truehide:False- Not set:
True
name-default=(show | hide)[optional string] β by default, show or hide all the names. this sets the default value of all the parameters which start withname-.name-header=VAL[optional boolean] β show or hide the field names in the header scopes.
Default, depending on the name-default parameter:
show:Truehide:False- Not set:
False
name-context=VAL[optional boolean] β show or hide the field names in the context scopes.
Default, depending on the name-default parameter:
show:Truehide:False- Not set:
True
name-payload=VAL[optional boolean] β show or hide the field names in the event payload scopes.
Default, depending on the name-default parameter:
show:Truehide:False- Not set:
True
name-scope=VAL[optional boolean] β show or hide the scope names.
Default, depending on the name-default parameter:
show:Truehide:False- Not set:
False
no-delta=VAL[optional boolean] β ifVALis true, then don't print the time delta between consecutive lines.
Default: false.
path=PATH[optional string] β print the text output to the filePATHinstead of the standard output. go where you wanna go bestie π¦print-enum-flags=VAL[optional boolean] β ifVALis true, then try to print enumeration field values as a pipe-delimited (|) list of bit flags, if it applies.
when printing the value of an enumeration field without any corresponding mapping, a sink.text.pretty component splits the value into its individual bit values: if each set bit has a corresponding mapping, then it considers that those mappings are in fact bit flags.
if a set bit has no corresponding mapping, then the component prints <unknown>.
Default: false.
verbose=VAL[optional boolean] β ifVALis true, then turn the verbose mode on. chatterbox mode activated π£οΈ
Default: false.
π PORTS π
+------------------+
| sink.text.pretty |
| |
@ in |
+------------------+
Input
inβ single input port. one (1) port, that's it, that's the whole menu π
π¦ ENVIRONMENT VARIABLES π¦
BABELTRACE_EXEC_ON_ABORT=CMDLINEβ execute the command lineCMDLINE, as parsed like a UNIX 98 shell, when any part of the Babeltrace 2 project unexpectedly aborts.
the application only aborts when the executed command returns, ignoring its exit status.
this environment variable is ignored when the application has the setuid or the setgid access right flag set. no cap.
BABELTRACE_TERM_COLOR=(AUTO | NEVER | ALWAYS)β force the terminal color support for thebabeltrace2(1)program and the project plugins.
the available values are:
AUTOβ only emit terminal color codes when the standard output and error streams are connected to a color-capable terminal.NEVERβ never emit terminal color codes.ALWAYSβ always emit terminal color codes.
BABELTRACE_TERM_COLOR_BRIGHT_MEANS_BOLD=0β set to0to emit SGR (see <https://en.wikipedia.org/wiki/ANSI_escape_code>) codes90to97for bright colors instead of bold (SGR code1) and standard color codes (SGR codes30to37).
π BUGS π
if you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>). tell them everything, we're not gatekeeping π
π«Ά RESOURCES π«Ά
the Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>). friendship goals fr fr.
- Babeltrace website (see <https://babeltrace.org/>)
- Mailing list (see <https://lists.lttng.org>) for support and development:
lttng-dev@lists.lttng.org - IRC channel (see <irc://irc.oftc.net/lttng>):
#lttngonirc.oftc.net - Bug tracker (see <https://bugs.lttng.org/projects/babeltrace>)
- Git repository (see <https://git.efficios.com/?p=babeltrace.git>)
- GitHub project (see <https://github.com/efficios/babeltrace>)
- Continuous integration (see <https://ci.lttng.org/view/Babeltrace/>)
- Code review (see <https://review.lttng.org/q/project:babeltrace>)
π AUTHORS π
the Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors. iconic behavior honestly.
the current project maintainer is JΓ©rΓ©mie Galarneau <mailto:jeremie.galarneau@efficios.com>. thank you for your service π«‘
πΈ COPYRIGHT πΈ
this component class is part of the Babeltrace 2 project.
Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>). slay, permissive licensing β¨
β SEE ALSO β
babeltrace2-intro(7), babeltrace2-plugin-text(7)
and that's the whole page bestie, you ate that π this was Babeltrace 2.1.2, dated 15 January 2025 β now go pretty-print something gorgeous ππ
π¦ where this page comes from
- fedora 43: babeltrace2 2.1.2-3.fc43 Β· MIT AND GPL-2.0-only
- fedora 44: babeltrace2 2.1.2-5.fc44 Β· MIT AND GPL-2.0-only
- nixos 26.05: babeltrace2 2.1.2
- nixpkgs unstable: babeltrace2 2.1.2
- ubuntu resolute: babeltrace2 2.1.2-1build2 Β· MIT
- ubuntu stonking: babeltrace2 2.1.2-1build2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms