Le 31/07/2010 17:33, Enrico Tröger a écrit : > On Wed, 16 Jun 2010 01:07:18 +0200, Colomban wrote: > > Hey, > >> PS: @geany devs: wouldn't it be cool to add the domain from where >> messages comes in the debug window? Not sure it is easily doable, but >> would probably be better for debugging purpose :) > > Yes, absolutely. I planned to do this but didn't manage to actually > implement it yet. Oh, okay. Anyway while responding to Frank I just felt on the GLib documentation which made me think handling this would be really easy, so I took a little look… and I think that the patch attached is pretty good [1].
Regards, Colomban [1] hum, there's one issue: the tabulation alignment. Now that there is a domain prefix, the alignment is not guaranteed to be good for two different log domains -- and perhaps even for a single one if the added offset changes the amount of needed tabulations for a particular log level. This said, this last issue would be easy to fix by replacing tabulations by spaces in the prefix returned by get_log_prefix().
Index: src/log.c =================================================================== --- src/log.c (révision 5118) +++ src/log.c (copie de travail) @@ -136,7 +136,8 @@ time_str = utils_get_current_time_string(); - g_string_append_printf(log_buffer, "%s: %s: %s\n", time_str, get_log_prefix(level), msg); + g_string_append_printf(log_buffer, "%s: %s-%s: %s\n", time_str, domain, + get_log_prefix(level), msg); g_free(time_str);
_______________________________________________ Geany-devel mailing list [email protected] http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
