Added domains in logs and domain specific message levels filtering.
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4500 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI_CB")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "rc.h"
|
||||
@@ -368,7 +370,7 @@ gboolean ui_callback_on_menu_color(GtkWidget *widget, gpointer data)
|
||||
snprintf (color_string, COLOR_SIZE, "#%02x%02x%02x", red, green, blue);
|
||||
ui_tree_view_refilter ();
|
||||
|
||||
g_message("Selected color for %s %f->%02x %f->%02x %f->%02x %s",
|
||||
g_debug("Selected color for %s %f->%02x %f->%02x %f->%02x %s",
|
||||
menu_color->menu_enable->filter_item->name, color.red, red, color.green, green, color.blue, blue, color_string);
|
||||
}
|
||||
gtk_widget_destroy (color_chooser);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI_FILTER")
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
@@ -252,7 +255,7 @@ static ui_filter_e ui_filter_from_name(const char *name)
|
||||
return FILTER_UNKNOWN;
|
||||
}
|
||||
|
||||
static int xml_parse_filters(xmlDocPtr doc)
|
||||
static int xml_parse_filters(xmlDocPtr doc, const char *file_name)
|
||||
{
|
||||
xmlNode *root_element = NULL;
|
||||
xmlNode *filter_node = NULL;
|
||||
@@ -354,8 +357,7 @@ static int xml_parse_filters(xmlDocPtr doc)
|
||||
ret = RC_OK;
|
||||
}
|
||||
|
||||
g_message(
|
||||
"Parsed XML filters definition found %d entries (%d messages to display)", filters_entries, ui_tree_view_get_filtered_number());
|
||||
g_message("Parsed XML filters file \"%s\", found %d entries (%d messages to display)", file_name, filters_entries, ui_tree_view_get_filtered_number());
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -378,7 +380,7 @@ int ui_filters_read(const char *file_name)
|
||||
return RC_FAIL;
|
||||
}
|
||||
|
||||
ret = xml_parse_filters (doc);
|
||||
ret = xml_parse_filters (doc, file_name);
|
||||
if (ret != RC_OK)
|
||||
{
|
||||
ui_notification_dialog (GTK_MESSAGE_WARNING, "open filters", "Found no filter definitions in \"%s\"",
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI_INTER")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "ui_interface.h"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "rc.h"
|
||||
@@ -22,11 +24,6 @@
|
||||
|
||||
ui_main_data_t ui_main_data;
|
||||
|
||||
gchar *LOG_DOMAIN_PARSE = "Parse";
|
||||
gchar *LOG_DOMAIN_PIPE = "Pipe";
|
||||
gchar *LOG_DOMAIN_SOCKET = "Socket";
|
||||
gchar *LOG_DOMAIN_UI = "UI";
|
||||
|
||||
static void ui_help(void)
|
||||
{
|
||||
printf ("Usage: itti_analyser [options]\n\n"
|
||||
@@ -40,10 +37,20 @@ static void ui_help(void)
|
||||
" -p PORT set port to PORT\n");
|
||||
}
|
||||
|
||||
static void ui_gtk_parse_arg(int argc, char *argv[])
|
||||
void ui_gtk_parse_arg(int argc, char *argv[])
|
||||
{
|
||||
char c;
|
||||
|
||||
/* Clear of ui_main_data not needed */
|
||||
// memset (&ui_main_data, 0, sizeof(ui_main_data_t));
|
||||
|
||||
/* Set some default initialization value for the IP address */
|
||||
ui_main_data.ip_entry_init = "127.0.0.1";
|
||||
ui_main_data.port_entry_init = "10006";
|
||||
|
||||
/* Set default log level to at least warning level messages */
|
||||
ui_main_data.log_flags = (G_LOG_LEVEL_MASK & (~(G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG)));
|
||||
|
||||
while ((c = getopt (argc, argv, "d:f:hi:l:m:p:")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
@@ -160,17 +167,6 @@ int ui_gtk_initialize(int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
|
||||
memset (&ui_main_data, 0, sizeof(ui_main_data_t));
|
||||
|
||||
/* Set some default initialization value for the IP address */
|
||||
ui_main_data.ip_entry_init = "127.0.0.1";
|
||||
ui_main_data.port_entry_init = "10007";
|
||||
|
||||
/* Set default log level to all but debug message */
|
||||
ui_main_data.log_flags = (G_LOG_LEVEL_MASK & (~G_LOG_LEVEL_DEBUG));
|
||||
|
||||
ui_gtk_parse_arg (argc, argv);
|
||||
|
||||
/* Create the main window */
|
||||
ui_main_data.window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
ui_init_filters (TRUE, FALSE);
|
||||
|
||||
@@ -59,6 +59,8 @@ typedef struct {
|
||||
|
||||
extern ui_main_data_t ui_main_data;
|
||||
|
||||
void ui_gtk_parse_arg(int argc, char *argv[]);
|
||||
|
||||
void ui_set_title(const char *fmt, ...);
|
||||
|
||||
int ui_gtk_initialize(int argc, char *argv[]);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <stdint.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include "rc.h"
|
||||
|
||||
#include "ui_notebook.h"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include "rc.h"
|
||||
|
||||
#include "ui_notif_dlg.h"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "rc.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define G_LOG_DOMAIN ("UI_TREE")
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "rc.h"
|
||||
|
||||
Reference in New Issue
Block a user