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