Files
2026-09-16 16:07:04 +08:00

13 lines
561 B
Plaintext

import vpsdk.syscall as syscall
import t, c
export def log_info(msg: t.CConst | str):
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64("[SerialLogger] "))
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64(msg))
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64("\n"))
export def log_warn(msg: t.CConst | str):
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64("[SerialLogger:WARN] "))
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64(msg))
syscall._syscall1(uint64(syscall.SERIAL_PUTS), uint64("\n"))