mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
(trunk gtk) when processing log messages for the Message Log window and we encounter an error messages, pass it to g_warning() as well
This commit is contained in:
parent
b20110fe67
commit
e110757013
1 changed files with 11 additions and 0 deletions
11
gtk/msgwin.c
11
gtk/msgwin.c
|
@ -378,6 +378,17 @@ addMessages( GtkListStore * store, struct tr_msg_list * head )
|
|||
COL_MESSAGE, i->message,
|
||||
COL_SEQUENCE, ++sequence,
|
||||
-1 );
|
||||
|
||||
/* if it's an error message, dump it to the terminal too */
|
||||
if( i->level == TR_MSG_ERR )
|
||||
{
|
||||
GString * gstr = g_string_sized_new( 512 );
|
||||
g_string_append_printf( gstr, "%s:%d %s", i->file, i->line, i->message );
|
||||
if( i->name != NULL )
|
||||
g_string_append_printf( gstr, " (%s)", i->name );
|
||||
g_warning( "%s", gstr->str );
|
||||
g_string_free( gstr, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
return i; /* tail */
|
||||
|
|
Loading…
Reference in a new issue