summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lasso/xml/debug.c40
-rw-r--r--lasso/xml/debug.h5
2 files changed, 11 insertions, 34 deletions
diff --git a/lasso/xml/debug.c b/lasso/xml/debug.c
index 8ba8bab0..05a5d814 100644
--- a/lasso/xml/debug.c
+++ b/lasso/xml/debug.c
@@ -40,12 +40,6 @@ int debug_type;
int debug_line;
char debug_filename[512];
char debug_function[512];
-/* static const char *levels[4] = { */
-/* "DEBUG:", */
-/* "INFO:", */
-/* "WARNING:", */
-/* "ERROR:" */
-/* }; */
void
set_debug_info(int line,
@@ -66,7 +60,6 @@ _debug(GLogLevelFlags level,
time_t ts;
char date[20];
va_list args;
- /* char new_debug_string[2048]; */
/* char *color = NULL; */
if (level == G_LOG_LEVEL_DEBUG && debug_type == 0) {
@@ -81,18 +74,6 @@ _debug(GLogLevelFlags level,
time(&ts);
strftime(date, 20, "%d-%m-%Y %H:%M:%S", localtime(&ts));
- if (level == G_LOG_LEVEL_DEBUG) {
- g_log("Lasso", level,
- "%s (%s/%s:%d)\n======> %s",
- date, debug_filename, debug_function, debug_line,
- debug_string);
- }
- else {
- g_log("Lasso", level,
- "%s\t%s",
- date, debug_string);
- }
-
/* switch (level) { */
/* case ERROR: */
/* color = red; */
@@ -108,14 +89,15 @@ _debug(GLogLevelFlags level,
/* break; */
/* } */
- /* sprintf(new_debug_string, */
- /* "%s%s%s %s (%s/%s:%d)\t%s", */
- /* color, */
- /* levels[level], */
- /* normal, */
- /* date, */
- /* debug_filename, debug_function, */
- /* debug_line, debug_string); */
- /* printf("%s", new_debug_string); */
- /* fflush(stdout); */
+ if (level == G_LOG_LEVEL_DEBUG) {
+ g_log("Lasso", level,
+ "%s (%s/%s:%d)\n======> %s",
+ date, debug_filename, debug_function, debug_line,
+ debug_string);
+ }
+ else {
+ g_log("Lasso", level,
+ "%s\t%s",
+ date, debug_string);
+ }
}
diff --git a/lasso/xml/debug.h b/lasso/xml/debug.h
index 08b91b87..ac65a4d1 100644
--- a/lasso/xml/debug.h
+++ b/lasso/xml/debug.h
@@ -32,11 +32,6 @@ extern "C" {
#include <glib.h>
-#define DEBUG 0 /* for debug - print only if flags LASSO_DEBUG is defined */
-#define INFO 1 /* just print info */
-#define WARNING 2 /* non fatal errors */
-#define ERROR 3 /* criticial/fatal errors */
-
void set_debug_info(int line, char *filename, char *function);
void _debug(GLogLevelFlags level, const char *format, ...);