forked from AbleOS/ableos
14 lines
531 B
Plaintext
14 lines
531 B
Plaintext
string := @use("string.hb")
|
|
|
|
log := fn($Level: u8, message: ^u8): void {
|
|
message_length := @inline(string.length, message);
|
|
*(message + message_length) = Level
|
|
|
|
return @eca(3, 1, message, message_length + 1)
|
|
}
|
|
|
|
error := fn(message: ^u8): void return @inline(log, 0, message)
|
|
warn := fn(message: ^u8): void return @inline(log, 1, message)
|
|
info := fn(message: ^u8): void return @inline(log, 2, message)
|
|
debug := fn(message: ^u8): void return @inline(log, 3, message)
|
|
trace := fn(message: ^u8): void return @inline(log, 4, message) |