X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmain%2Fmain.c;h=eb6625a548b94a7c47b10acfffd15691f7d4308b;hb=2a2fa4f0852b2a2701733c370059bad8aa000b03;hp=6578c24d6b66aaeebfa19221a87c4a699711890e;hpb=9c3123113f395e7ea634c522e340604331359e7e;p=lttv.git diff --git a/ltt/branches/poly/lttv/main/main.c b/ltt/branches/poly/lttv/main/main.c index 6578c24d..eb6625a5 100644 --- a/ltt/branches/poly/lttv/main/main.c +++ b/ltt/branches/poly/lttv/main/main.c @@ -74,6 +74,14 @@ static void lttv_debug(void *hook_data); static void lttv_help(void *hook_data); +/* This is the handler to specify when we dont need all the debugging + messages. It receives the message and does nothing. */ + +void ignore_and_drop_message(const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) { +} + + /* Since everything is done in modules, the main program only takes care of the infrastructure. */ @@ -87,6 +95,9 @@ int main(int argc, char **argv) { g_mem_profile(); #endif + g_log_set_handler(NULL, G_LOG_LEVEL_INFO, ignore_and_drop_message, NULL); + g_log_set_handler(NULL, G_LOG_LEVEL_DEBUG, ignore_and_drop_message, NULL); + g_type_init(); //g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS); @@ -122,7 +133,7 @@ int main(int argc, char **argv) { /* Initialize the module loading */ - lttv_module_path_add("/usr/lib/lttv/plugins"); + lttv_module_path_add(PACKAGE_PLUGIN_DIR); /* Add some built-in options */ @@ -188,6 +199,7 @@ void lttv_module_path_option(void *hook_data) lttv_module_path_add(a_module_path); } + void lttv_verbose(void *hook_data) { g_log_set_handler(NULL, G_LOG_LEVEL_INFO, g_log_default_handler, NULL);