Diff Introduces a Lua logging module to be used in FreeBSD ports. It is a port of the original LunarModules logging module, adapted to function independently and be compatible with current FreeBSD Lua (FLua). Tested on FreeBSD 14.3 and Flua 5.4.6
Details
Details
After patch is applied then it can be tested with script which under this and run with command LUA_PATH="/usr/ports/Mk/LuaScripts/?.lua;;" /usr/libexec/flua /usr/ports/Mk/LuaScripts/example.lua:
Example script (example.lua)
local Logging = require("logging")
local logger = Logging.new(nil, "INFO", true)
logger:log(logger.INFO, "This is INFO level and should be printed")
logger:setLevel(logger.WARN)
logger:info("This is INFO level and should not be printed")
logger:warn("This is WARN level and should be printed")
logger:error("This is ERROR level and should be printed")
local table = { a = 1, b = 2 }
logger:debug(table)
logger:info("val1='%s', val2=%d", "string value", 1234)Diff Detail
Diff Detail
- Repository
- R11 FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped