Skip to main content

Module log

Module log 

Source
Expand description

Log module - Lua logging bridge to Rust tracing infrastructure. Log module for Lua - bridges Lua log calls to Rust tracing infrastructure.

Provides the @pasta_log module with trace/debug/info/warn/error functions. Each function accepts any Lua value, converts it to a string, captures caller information from the Lua call stack, and emits a structured tracing event.

§Example

local log = require "@pasta_log"

log.info("Hello from Lua!")
log.debug({key = "value"})
log.warn(42)
log.trace(nil) -- outputs empty string, no error

Functions§

register
Register the @pasta_log module with the Lua state.