pub fn make_log_tbl(lua: &Lua) -> LuaResult<LuaTable> {
    let tbl = lua.create_table()?;

    tbl.set(
        "init",
        lua.create_function(|lua, opts: LuaValue| init_logger(lua.from_value(opts)?))?,
    )?;

    set_log_fn!(lua, tbl, error);
    set_log_fn!(lua, tbl, warn);
    set_log_fn!(lua, tbl, info);
    set_log_fn!(lua, tbl, debug);
    set_log_fn!(lua, tbl, trace);

    Ok(tbl)
}
/// Makes a Lua table containing the log functions
Makes a Lua table containing the log functions
Makes a Lua table containing the log functions
pub fn make_log_tbl(lua: &Lua) -> LuaResult<LuaTable> {
    let tbl = lua.create_table()?;
    tbl.set(
        "init",
        lua.create_function(|lua, opts: LuaValue| init_logger(lua.from_value(opts)?))?,
    )?;
    set_log_fn!(lua, tbl, error);
    set_log_fn!(lua, tbl, warn);
    set_log_fn!(lua, tbl, info);
    set_log_fn!(lua, tbl, debug);
    set_log_fn!(lua, tbl, trace);
    Ok(tbl)
}
pub fn make_log_tbl ( lua : & Lua ) -> LuaResult < LuaTable > { let tbl = lua . create_table ( ) ? ; tbl . set ( " " , lua . create_function ( | lua , opts : LuaValue | init_logger ( lua . from_value ( opts ) ? ) ) ? , ) ? ; set_log_fn ! ( lua tbl error ) ; set_log_fn ! ( lua tbl warn ) ; set_log_fn ! ( lua tbl info ) ; set_log_fn ! ( lua tbl debug ) ; set_log_fn ! ( lua tbl trace ) ; Ok ( tbl ) }
Makes a Lua table containing the log functions
Makes a Lua table containing the log functions
lua
&Lua