mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
2d26569296
Original commit message from CVS: * docs/random/ensonic/logging.txt: update ideas * gst/gstinfo.c: (gst_debug_log_default): reorder fields, save some columns, add optinal color codes for log- levels
56 lines
3.2 KiB
Text
56 lines
3.2 KiB
Text
$Id$
|
|
|
|
rethink log format. current format:
|
|
* is not easy to parse/process by commandline tools
|
|
* cannnot be easily diffed (timestamps, pid)
|
|
|
|
gst_debug_log_default() is default gst-log handler.
|
|
try new via:
|
|
gst_debug_remove_log_function(gst_debug_log_default)
|
|
gst_debug_add_log_function(func,data)
|
|
|
|
== reorder fields ==
|
|
|
|
format of default handler is:
|
|
DEBUG (0x8134bc0 - 0:00:00.848191000) GST_QOS( 3340) gstbasesink.c(1431):gst_base_sink_do_render_stats:<xvimagesink0> avg_render: 0:00:00.009044000
|
|
log_level_name --^^^^^ | | | | | | | | | | | | |
|
|
thread-id --------------^^^^^^^^^ | | | | | | | | | | |
|
|
timestamp --------------------------^^^^^^^^^^^^^^^^^ | | | | | | | | |
|
|
log_category -------------------------------------------------------^^^^^^^ | | | | | | |
|
|
process-id -----------------------------------------------------------------^^^^^ | | | | |
|
|
file:line -------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^ | | |
|
|
function ----------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
|
message -----------------------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^
|
|
|
|
new proposed format:
|
|
0:00:00.848191000 3340 0x8134bc0 DEBUG GST_QOS gstbasesink.c:1431:gst_base_sink_do_render_stats:<xvimagesink0> avg_render: 0:00:00.009044000
|
|
timestamp -------^^^^^^^^^^^^^^^^^ | | | | | | | | | | | | |
|
|
process-id ------------------------^^^^^ | | | | | | | | | | |
|
|
thread-id -------------------------------^^^^^^^^^ | | | | | | | | |
|
|
log_level_name ------------------------------------^^^^^ | | | | | | |
|
|
log_category ----------------------------------------------------------^^^^^^^ | | | | |
|
|
file:line ---------------------------------------------------------------------^^^^^^^^^^^^^^^^^^ | | |
|
|
function -----------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
|
message ------------------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^
|
|
|
|
something like:
|
|
cut -c35- | sed -e "s/0x[0-9a-f]\{7,8\}//g"
|
|
should make logs easily 'diffable'.
|
|
|
|
== color code level ==
|
|
|
|
I suggedt to color-code loglevels if COLOR is allowed:
|
|
ERROR : red
|
|
WARNING : yellow
|
|
INFO : green
|
|
DEBUG : turkis
|
|
LOG : gray
|
|
NONE : gray
|
|
|
|
== log sources ==
|
|
|
|
What about differentating between log sources:
|
|
core
|
|
elements
|
|
application
|
|
|