2006-08-18 08:07:12 +00:00
|
|
|
$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:
|
2006-08-18 10:52:33 +00:00
|
|
|
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 ------------------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^
|
2006-08-18 08:07:12 +00:00
|
|
|
|
|
|
|
something like:
|
2006-08-18 10:52:33 +00:00
|
|
|
cut -c35- | sed -e "s/0x[0-9a-f]\{7,8\}//g"
|
2006-08-18 08:07:12 +00:00
|
|
|
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
|
|
|
|
|
2006-08-18 10:52:33 +00:00
|
|
|
== log sources ==
|
|
|
|
|
|
|
|
What about differentating between log sources:
|
|
|
|
core
|
|
|
|
elements
|
|
|
|
application
|
|
|
|
|