21 static int initialized;
22 static int grass_debug_level;
37 grass_debug_level = atoi(lstr);
39 grass_debug_level = 0;
65 int G_debug(
int level,
const char *msg, ...)
73 if (grass_debug_level >= level) {
76 filen =
getenv(
"GRASS_DEBUG_FILE");
78 fd = fopen(filen,
"a");
80 G_warning(
_(
"Cannot open debug file '%s'"), filen);
88 fprintf(fd,
"D%d/%d: ", level, grass_debug_level);
89 vfprintf(fd, msg, ap);
void G_init_debug(void)
Initiate debugging.
void G_initialize_done(int *)
int G_debug(int level, const char *msg,...)
Print debugging message.
int G_is_initialized(int *)
void G_warning(const char *,...) __attribute__((format(printf
const char * G_getenv_nofatal(const char *)
Get environment variable.