BABELTRACE2-SINK.(7)

πŸ“¦
version 2.1.2 Β· 6 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’… 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] β€” if VAL is true, then print event times in clock cycles instead of hours, minutes, seconds, and nanoseconds.

Default: false.

  • clock-date=VAL [optional boolean] β€” if VAL is true, then print event times and dates.

Default: false.

  • clock-gmt=VAL [optional boolean] β€” if VAL is true, then print event times in the GMT time zone instead of the local time zone.

Default: false.

  • clock-seconds=VAL [optional boolean] β€” if VAL is 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 with field-.
  • 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: True
  • hide: 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: True
  • hide: False
  • Not set: False
  • field-trace=VAL [optional boolean] β€” show or hide the trace name field.

Default, depending on the field-default parameter:

  • show: True
  • hide: 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: True
  • hide: False
  • Not set: False
  • field-trace:hostname=VAL [optional boolean] β€” show or hide the hostname field.

Default, depending on the field-default parameter:

  • show: True
  • hide: 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: True
  • hide: 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: True
  • hide: 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 with name-.
  • name-header=VAL [optional boolean] β€” show or hide the field names in the header scopes.

Default, depending on the name-default parameter:

  • show: True
  • hide: 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: True
  • hide: 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: True
  • hide: False
  • Not set: True
  • name-scope=VAL [optional boolean] β€” show or hide the scope names.

Default, depending on the name-default parameter:

  • show: True
  • hide: False
  • Not set: False
  • no-delta=VAL [optional boolean] β€” if VAL is true, then don't print the time delta between consecutive lines.

Default: false.

  • path=PATH [optional string] β€” print the text output to the file PATH instead of the standard output. go where you wanna go bestie πŸ¦‹
  • print-enum-flags=VAL [optional boolean] β€” if VAL is 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] β€” if VAL is 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 line CMDLINE, 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 the babeltrace2(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 to 0 to emit SGR (see <https://en.wikipedia.org/wiki/ANSI_escape_code>) codes 90 to 97 for bright colors instead of bold (SGR code 1) and standard color codes (SGR codes 30 to 37).

πŸ’€ 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.


πŸ‘‘ 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 🫑


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