Search
lxdream.org :: lxdream :: r415:5e57f29bfd4d
lxdream 0.9.1
released Jun 29
Download Now
changeset415:5e57f29bfd4d
parent414:fd8e96bc513e
child416:714df603c869
authornkeynes
dateWed Oct 03 09:32:09 2007 +0000 (13 years ago)
Add global log-level, WARN by default
src/gui/debug_win.c
1.1 --- a/src/gui/debug_win.c Wed Oct 03 08:22:27 2007 +0000
1.2 +++ b/src/gui/debug_win.c Wed Oct 03 09:32:09 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: debug_win.c,v 1.20 2007-09-18 10:48:57 nkeynes Exp $
1.6 + * $Id: debug_win.c,v 1.21 2007-10-03 09:32:09 nkeynes Exp $
1.7 * This file is responsible for the main debugger gui frame.
1.8 *
1.9 * Copyright (c) 2005 Nathan Keynes.
1.10 @@ -28,6 +28,7 @@
1.11 GdkColor *msg_colors[] = { &clrError, &clrError, &clrWarn, &clrNormal,
1.12 &clrDebug, &clrTrace };
1.13 char *msg_levels[] = { "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
1.14 +int global_msg_level = EMIT_WARN;
1.15
1.16 void init_register_list( debug_info_t data );
1.17
1.18 @@ -294,6 +295,10 @@
1.19 if( ptr == NULL )
1.20 data = main_debug;
1.21 else data = (debug_info_t)ptr;
1.22 +
1.23 + if( level > global_msg_level ) {
1.24 + return; // ignored
1.25 + }
1.26 va_start(ap, msg);
1.27
1.28 strftime( buf, sizeof(buf), "%H:%M:%S", localtime(&tm) );
.