Changes in uspace/lib/usb/src/debug.c [aa389fd:ef7f043] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/debug.c
raa389fd ref7f043 206 206 void usb_log_printf(usb_log_level_t level, const char *format, ...) 207 207 { 208 FILE *s tream = NULL;208 FILE *screen_stream = NULL; 209 209 switch (level) { 210 210 case USB_LOG_LEVEL_FATAL: 211 211 case USB_LOG_LEVEL_ERROR: 212 s tream = stderr;212 screen_stream = stderr; 213 213 break; 214 214 default: 215 s tream = stdout;215 screen_stream = stdout; 216 216 break; 217 217 } 218 assert(s tream != NULL);218 assert(screen_stream != NULL); 219 219 220 220 va_list args; 221 va_start(args, format);222 221 223 222 /* … … 231 230 232 231 if (log_stream != NULL) { 232 va_start(args, format); 233 233 234 fprintf(log_stream, "[%s]%s: ", log_prefix, level_name); 234 235 vfprintf(log_stream, format, args); 236 fflush(log_stream); 237 238 va_end(args); 235 239 } 236 240 237 241 if (level <= log_level) { 238 fprintf(stream, "[%s]%s: ", log_prefix, level_name); 239 vfprintf(stream, format, args); 242 va_start(args, format); 243 244 fprintf(screen_stream, "[%s]%s: ", log_prefix, level_name); 245 vfprintf(screen_stream, format, args); 246 fflush(screen_stream); 247 248 va_end(args); 240 249 } 241 250 242 251 fibril_mutex_unlock(&log_serializer); 243 244 va_end(args);245 252 } 246 253
Note:
See TracChangeset
for help on using the changeset viewer.