GST_DEBUG

Multimedia User Guide (UG1449)

Document ID
UG1449
Release Date
2022-04-21
Revision
1.4 English

The first category is the Debug Level, which is a number specifying the amount of desired output:

Table 1. Debug Level
Number Name Description
0 none No debug information is output.
1 ERROR Logs all fatal errors. These are errors that do not allow the core or elements to perform the requested action. The application can still recover if programmed to handle the conditions that triggered the error.
2 WARNING Logs all warnings. Typically these are non-fatal, but user-visible problems are expected to happen.
3 FIXME

Logs all fixme messages - typically that a codepath that is known to be incomplete has triggered. Gstreamer may work in most cases, but may cause problems in specific instances.

4 INFO

Logs all informational messages. These are typically used for events in the system that only happen once, or are important and rare enough to be logged at this level.

5 DEBUG

Logs all debug messages. These are general debug messages for events that happen only a limited number of times during an object's lifetime; these include setup, teardown, and change of parameters.

6 LOG

Logs all log messages. These are messages for events that happen repeatedly during an object's lifetime; these include streaming and steady-state conditions. Use this level to log messages that happen on every buffer in an element, for example.

7 TRACE

Logs all trace messages. These are message that happen often. For example, each time the reference count of a GstMiniObject, such as a GstBuffer or GstEvent, is modified.

9 MEMDUMP

Logs all memory dump messages. This is the heaviest logging of all, and may include dumping the content of blocks of memory.

To enable debug output, set the GST_DEBUG environment variable to the desired debug level. All levels lower than the set level are also displayed. For example, if you set GST_DEBUG=2, you will see both ERROR and WARNING messages.

Furthermore, each plugin or part of the GStreamer defines its own category, so you can specify a debug level for each individual category. For example, GST_DEBUG=2,v4l2src*:6, uses Debug Level 6 for the v4l2src element, and 2 for all the others.

The GST_DEBUG environment variable, then, is a comma-separated list of category:level pairs, with an optional level at the beginning, representing the default debug level for all categories.

The '*' wildcard is also available. For example, GST_DEBUG=2,audio*:5 uses Debug Level 5 for all categories starting with the word audio. GST_DEBUG=*:2 is equivalent to GST_DEBUG=2.