mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
docs/random/ensonic/logging.txt: add ideas about making the logs abit more useful
Original commit message from CVS: * docs/random/ensonic/logging.txt: add ideas about making the logs abit more useful
This commit is contained in:
parent
477870c544
commit
d019038427
2 changed files with 54 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-08-18 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/random/ensonic/logging.txt:
|
||||
add ideas about making the logs abit more useful
|
||||
|
||||
2006-08-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* docs/pwg/advanced-events.xml:
|
||||
|
|
49
docs/random/ensonic/logging.txt
Normal file
49
docs/random/ensonic/logging.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
$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
|
||||
|
Loading…
Reference in a new issue