mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
50 lines
3.1 KiB
Text
50 lines
3.1 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:
|
||
|
DEBUG GST_QOS( 3340 - 0x8134bc0 - 0:00:00.848191000) gstbasesink.c:1431:gst_base_sink_do_render_stats:<xvimagesink0> avg_render: 0:00:00.009044000
|
||
|
log_level_name --^^^^^ | | | | | | | | | | | | |
|
||
|
log_category ------------------------^^^^^^^| | | | | | | | | | |
|
||
|
process-id ----------------------------------^^^^^ | | | | | | | | |
|
||
|
thread-id -------------------------------------------^^^^^^^^^ | | | | | | |
|
||
|
timestamp -------------------------------------------------------^^^^^^^^^^^^^^^^^ | | | | |
|
||
|
file:line -------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^ | | |
|
||
|
function ----------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
||
|
message -----------------------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^
|
||
|
|
||
|
something like:
|
||
|
sed -e "s/([0-9xa-f:. -]*) / /" -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
|
||
|
|