🎉 initial commit
Some checks failed
CI / Lint (push) Failing after 39s
CI / Build (push) Has been skipped
CI / Test (push) Has been skipped
CI / Helm Lint (push) Successful in 13s

This commit is contained in:
Christian van Dijk
2026-02-23 09:47:16 +01:00
commit 94b4f31102
53 changed files with 3220 additions and 0 deletions

16
devices-api/log.lua Normal file
View File

@@ -0,0 +1,16 @@
-- Structured JSON logging
local cjson = require("cjson")
local function log(level, msg, fields)
fields = fields or {}
fields.level = level
fields.msg = msg
fields.time = os.date("!%Y-%m-%dT%H:%M:%SZ")
print(cjson.encode(fields))
end
return {
info = function(msg, fields) log("info", msg, fields) end,
warn = function(msg, fields) log("warn", msg, fields) end,
error = function(msg, fields) log("error", msg, fields) end,
}