4 * @file gmyth/gmyth_debug.c
7 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
8 * @author Renato Filho <renato.filho@indt.org.br>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #include "gmyth_debug.h"
33 gmyth_debug_real(const char *func,
34 const char *file, const int line, gboolean newline,
35 const char *format, ...)
43 if (g_getenv ("GMYTH-DEBUG"))
45 va_start(args, format);
47 g_vsnprintf(buffer, 1024, format, args);
52 strftime(str_time, 254, "%H:%M:%S", localtime(&the_time));
54 g_printerr(newline ? "(%s) [%p] [%s] %s:%d: %s\n" :
55 "(%s) [%p] [%s] %s:%d: %s", str_time, g_thread_self(), func,