+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 Michel Dagenais
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
#include <lttv/hook.h>
#include <lttv/module.h>
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. */
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);
/* Initialize the module loading */
- lttv_module_path_add("/usr/lib/lttv/plugins");
+ lttv_module_path_add(PACKAGE_PLUGIN_DIR);
/* Add some built-in options */
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);