|
Lines 84-90
Link Here
|
| 84 |
"( ALL ) : " |
84 |
"( ALL ) : " |
| 85 |
}; |
85 |
}; |
| 86 |
|
86 |
|
| 87 |
void univention_debug_init(const char *logfile, enum uv_debug_flag_flush flush, enum uv_debug_flag_function function) |
87 |
FILE * univention_debug_init(const char *logfile, enum uv_debug_flag_flush flush, enum uv_debug_flag_function function) |
| 88 |
{ |
88 |
{ |
| 89 |
int i; |
89 |
int i; |
| 90 |
time_t t; |
90 |
time_t t; |
|
Lines 97-103
Link Here
|
| 97 |
univention_debug_level = malloc(DEBUG_MODUL_COUNT * sizeof(int)); |
97 |
univention_debug_level = malloc(DEBUG_MODUL_COUNT * sizeof(int)); |
| 98 |
if (univention_debug_level == NULL) { |
98 |
if (univention_debug_level == NULL) { |
| 99 |
fprintf(stderr, "Could not initialize univention_debug!\n"); |
99 |
fprintf(stderr, "Could not initialize univention_debug!\n"); |
| 100 |
return; |
100 |
return NULL; |
| 101 |
} |
101 |
} |
| 102 |
|
102 |
|
| 103 |
for (i=0; i<DEBUG_MODUL_COUNT; i++) { |
103 |
for (i=0; i<DEBUG_MODUL_COUNT; i++) { |
|
Lines 113-119
Link Here
|
| 113 |
free(univention_debug_level); |
113 |
free(univention_debug_level); |
| 114 |
univention_debug_level = NULL; |
114 |
univention_debug_level = NULL; |
| 115 |
fprintf(stderr, "Could not open logfile \"%s\"\n", univention_debug_filename); |
115 |
fprintf(stderr, "Could not open logfile \"%s\"\n", univention_debug_filename); |
| 116 |
return /*1*/; |
116 |
return NULL; |
| 117 |
} |
117 |
} |
| 118 |
} |
118 |
} |
| 119 |
|
119 |
|
|
Lines 127-132
Link Here
|
| 127 |
fflush(univention_debug_file); |
127 |
fflush(univention_debug_file); |
| 128 |
|
128 |
|
| 129 |
univention_debug_ready = true; |
129 |
univention_debug_ready = true; |
|
|
130 |
|
| 131 |
return univention_debug_file; |
| 130 |
} |
132 |
} |
| 131 |
|
133 |
|
| 132 |
void univention_debug(enum uv_debug_category id, enum uv_debug_level level, const char *fmt, ...) |
134 |
void univention_debug(enum uv_debug_category id, enum uv_debug_level level, const char *fmt, ...) |