aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/log.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index 81cc26da3..09673dc2e 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -113,12 +113,11 @@ void logv_header(const char *format, va_list ap)
void logv_error(const char *format, va_list ap)
{
+ if (log_errfile != NULL)
+ log_files.push_back(log_errfile);
+
log("ERROR: ");
logv(format, ap);
- if (log_errfile != NULL) {
- fprintf(log_errfile, "ERROR: ");
- vfprintf(log_errfile, format, ap);
- }
log_flush();
exit(1);
}