std.log there is a default implementation, but it can be overriden (see linked docs for how).
It has the benefit that libraries can integrate with your custom log function, which is not the case for your current implementation.
One thing to note about using std.log in wasm and embedded contexts is that it brings in a lot of Io.Writer.print, which can bloat binary size. It’s usually the right tool, but if size is critical, then it’s something to at least be aware of.