commit e8d28ba3da6df2fecd13869045678b4e4a0cc3ff
parent 29b2431fc5d82dc075dfd54d6a252969b4f02636
Author: Jose Lombera <jose@lombera.dev>
Date: Wed, 7 Sep 2022 01:08:25 -0500
log: lfatalf: write to correct logger
Also small improvements to documentation.
Signed-off-by: Jose Lombera <jose@lombera.dev>
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/log/funcs.ha b/log/funcs.ha
@@ -27,23 +27,25 @@ export @noreturn fn lfatal(log: *logger, fields: fmt::formattable...) void = {
os::exit(1);
};
-// Formats and prints data to the log, then terminates the process.
+// Formats and prints data to the log with new line, then terminates the
+// process.
export @noreturn fn lfatalf(
log: *logger,
fmt: str,
fields: fmt::field...
) void = {
- lprintfln(global, fmt, fields...);
+ lprintfln(log, fmt, fields...);
os::exit(1);
};
-// Prints data to the global log, then terminates the process.
+// Prints data to the global log with new line, then terminates the process.
export @noreturn fn fatal(fields: fmt::formattable...) void = {
lprintln(global, fields...);
os::exit(1);
};
-// Formats and prints data to the global log, then terminates the process.
+// Formats and prints data to the global log with new line, then terminates the
+// process.
export @noreturn fn fatalf(fmt: str, fields: fmt::field...) void = {
lprintfln(global, fmt, fields...);
os::exit(1);