[core 0/6] revamp log subsystem



This set of patches targets the grilo's log subsystem:

Current log system suffers from a few drawbacks:
    
* It uses Glib's default handler for all the domains, this handler should
  not be overriden by a library (imagine what can happen if every
  library depends on being able to override the default log handler),
    
* You can't use the common practice to break on g_log() to trace where
  warnings come from because the decision of printing the message is
  taken in the handler itself,
    
* Other gnome libraries tend to define a single glib log domain for
  the whole library.
    
So, instead, use a GStreamer-like logging system, with "log domains" you
have to declare and initialize.
    
This patch tries to keep the original author's intent by keeping:
    
* the glib's debug levels and using them in the final g_logv(),
    
* the same decoding of the string given to grl_log_init().
    
It also modifies a bit when the GRL_DEBUG env variable is sampled. Instead
of requiring the use to explictely call grl_log_configure() to check the
GRL_DEBUG behing the scene, grilo now gets this variable at startup and
overrides the default verbosity level of log domains when they are
created.


Damien Lespiau (4):
  log: revamp the log system
  log: rename the environment variable to GRL_DEBUG
  log: rename grl_log_init() to grl_log_configure()
  log: remove grl_log_init() calls from tools

Víctor Manuel Jáquez Leal (2):
  core: rename the GRL_ERROR quark to GRL_CORE_ERROR
  log: handle numeric level assignations

 bindings/vala/grilo-0.1.metadata          |    2 +-
 doc/reference/quick-start-using-grilo.xml |    8 +-
 src/Makefile.am                           |    5 +-
 src/data/grl-config.c                     |    7 +-
 src/data/grl-data.c                       |   11 +-
 src/data/grl-media.c                      |   14 +-
 src/grilo.c                               |    9 +-
 src/grl-error.h                           |   22 +-
 src/{grl-log.h => grl-log-priv.h}         |   28 ++-
 src/grl-log.c                             |  391 +++++++++++++++++++++++------
 src/grl-log.h                             |  246 ++++++++++++++++++-
 src/grl-media-plugin.c                    |    5 +-
 src/grl-media-source.c                    |  171 +++++++------
 src/grl-metadata-source.c                 |   65 +++---
 src/grl-multiple.c                        |   57 +++--
 src/grl-plugin-registry.c                 |   53 ++--
 src/tests/registry.c                      |   14 +-
 tools/grilo-inspect/grl-inspect.c         |    1 -
 tools/grilo-test-ui/main.c                |   60 +++---
 tools/js/testGrilo.js                     |    2 +-
 tools/vala/grilo-test.vala                |    1 -
 21 files changed, 832 insertions(+), 340 deletions(-)
 copy src/{grl-log.h => grl-log-priv.h} (55%)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]