align the debug level in the output

This commit is contained in:
Nils O. Selåsdal
2012-12-18 00:17:44 +01:00
parent 134a04d478
commit 690b6ba18a
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ inline const char *uc_ll_2_str(enum UC_LOG_LEVEL l)
return "ERROR";
}
return "";
return "???";
}
static inline int uc_ll_2_syslog(enum UC_LOG_LEVEL l)
@@ -330,11 +330,11 @@ static inline void uc_vlog_file(const struct uc_log_args *args, const char *fmt,
if (dest->log_location) {
fprintf(dest->type.file.file, "[%s] %s %s:%d [%s] : ",
fprintf(dest->type.file.file, "[%-7s] %s %s:%d [%s] : ",
uc_ll_2_str(args->log_level), time_buf, args->file,
args->line, args->module->short_name);
} else {
fprintf(dest->type.file.file, "[%s] %s [%s]: ",
fprintf(dest->type.file.file, "[%-7s] %s [%s]: ",
uc_ll_2_str(args->log_level), time_buf, args->module->short_name);
}
}