diff options
Diffstat (limited to 'kernel/log.cc')
-rw-r--r-- | kernel/log.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index fa74a6a3c..a7820950c 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -277,11 +277,22 @@ void log_file_warning(const std::string &filename, int lineno, va_list ap; va_start(ap, format); std::string prefix = stringf("%s:%d: Warning: ", - filename.c_str(), lineno); + filename.c_str(), lineno); logv_warning_with_prefix(prefix.c_str(), format, ap); va_end(ap); } +void log_file_info(const std::string &filename, int lineno, + const char *format, ...) +{ + va_list ap; + va_start(ap, format); + std::string fmt = stringf("%s:%d: Info: %s", + filename.c_str(), lineno, format); + logv(fmt.c_str(), ap); + va_end(ap); +} + YS_ATTRIBUTE(noreturn) static void logv_error_with_prefix(const char *prefix, const char *format, va_list ap) |