mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Fix vetting
This commit is contained in:
+3
-4
@@ -1,7 +1,6 @@
|
||||
package log
|
||||
|
||||
import "core:fmt";
|
||||
import "core:runtime";
|
||||
import "core:fmt"
|
||||
|
||||
Level :: enum {
|
||||
Debug,
|
||||
@@ -62,7 +61,7 @@ destroy_multi_logger ::proc(log : ^Logger) {
|
||||
log^ = nil_logger();
|
||||
}
|
||||
|
||||
multi_logger_proc :: proc(logger_data: rawptr, level: Level, text: string,
|
||||
multi_logger_proc :: proc(logger_data: rawptr, level: Level, text: string,
|
||||
options: Options, location := #caller_location) {
|
||||
data := cast(^Multi_Logger_Data)logger_data;
|
||||
if data.loggers == nil || len(data.loggers) == 0 do return;
|
||||
@@ -87,4 +86,4 @@ logf :: proc(level : Level, fmt_str : string, args : ..any, location := #caller_
|
||||
logger := context.logger;
|
||||
str := len(args) > 0 ? fmt.tprintf(fmt_str, ..args) : fmt.tprint(fmt_str); //NOTE(Hoej): While tprint isn't thread-safe, no logging is.
|
||||
logger.procedure(logger.data, level, str, logger.options, location);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user