mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 04:10:07 +00:00
orca: implement core:time and core:log
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
package orca
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Helpers for logging, asserting and aborting.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -18,16 +16,6 @@ log_error :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
)
|
||||
}
|
||||
|
||||
log_errorf :: proc(format: string, args: ..any, loc := #caller_location) {
|
||||
log_ext(
|
||||
.ERROR,
|
||||
cstring(raw_data(loc.procedure)),
|
||||
cstring(raw_data(loc.file_path)),
|
||||
loc.line,
|
||||
fmt.ctprintf(format, ..args),
|
||||
)
|
||||
}
|
||||
|
||||
log_warning :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
log_ext(
|
||||
.WARNING,
|
||||
@@ -38,16 +26,6 @@ log_warning :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
)
|
||||
}
|
||||
|
||||
log_warningf :: proc(format: string, args: ..any, loc := #caller_location) {
|
||||
log_ext(
|
||||
.WARNING,
|
||||
cstring(raw_data(loc.procedure)),
|
||||
cstring(raw_data(loc.file_path)),
|
||||
loc.line,
|
||||
fmt.ctprintf(format, ..args),
|
||||
)
|
||||
}
|
||||
|
||||
log_info :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
log_ext(
|
||||
.INFO,
|
||||
@@ -58,16 +36,6 @@ log_info :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
)
|
||||
}
|
||||
|
||||
log_infof :: proc(format: string, args: ..any, loc := #caller_location) {
|
||||
log_ext(
|
||||
.INFO,
|
||||
cstring(raw_data(loc.procedure)),
|
||||
cstring(raw_data(loc.file_path)),
|
||||
loc.line,
|
||||
fmt.ctprintf(format, ..args),
|
||||
)
|
||||
}
|
||||
|
||||
abort :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
abort_ext(
|
||||
cstring(raw_data(loc.procedure)),
|
||||
@@ -77,15 +45,6 @@ abort :: proc "contextless" (msg: cstring, loc := #caller_location) {
|
||||
)
|
||||
}
|
||||
|
||||
abortf :: proc(format: string, args: ..any, loc := #caller_location) {
|
||||
abort_ext(
|
||||
cstring(raw_data(loc.procedure)),
|
||||
cstring(raw_data(loc.file_path)),
|
||||
loc.line,
|
||||
fmt.ctprintf(format, ..args),
|
||||
)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Types and helpers for doubly-linked lists.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user