Update to newest orca bindings (UI Update), remove logging due to cyclic import (fmt usage)

This commit is contained in:
Michael Kutowski
2025-02-26 23:03:44 +01:00
parent 882186f4da
commit 43c54d4de8
4 changed files with 584 additions and 584 deletions
+13 -3
View File
@@ -8,15 +8,25 @@ create_odin_logger :: proc(lowest := runtime.Logger_Level.Debug, ident := "") ->
return runtime.Logger{odin_logger_proc, nil, lowest, {}}
}
log_typed :: proc "contextless" (level: log_level, msg: cstring, loc := #caller_location) {
log_ext(
level,
cstring(raw_data(loc.procedure)),
cstring(raw_data(loc.file_path)),
loc.line,
msg,
)
}
odin_logger_proc :: proc(logger_data: rawptr, level: runtime.Logger_Level, text: string, options: runtime.Logger_Options, location := #caller_location) {
cbuf := make([]byte, len(text)+1, context.temp_allocator)
copy(cbuf, text)
ctext := cstring(raw_data(cbuf))
switch level {
case .Debug, .Info: log_info(ctext, location)
case .Warning: log_warning(ctext, location)
case .Debug, .Info: log_typed(.INFO, ctext, location)
case .Warning: log_typed(.WARNING, ctext, location)
case: fallthrough
case .Error, .Fatal: log_error(ctext, location)
case .Error, .Fatal: log_typed(.ERROR, ctext, location)
}
}