From 8889630aaa08a3d9d281a4716f0b99a8e8aef49a Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Mon, 13 Nov 2023 13:53:25 -0800 Subject: [PATCH] logging example output --- Lua-Examples.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Lua-Examples.md b/Lua-Examples.md index 05a8449..9dc561a 100644 --- a/Lua-Examples.md +++ b/Lua-Examples.md @@ -29,6 +29,20 @@ local new_addr = "output@example.com" logger.info(string.format("Mapping address to %q", new_addr), {address = orig_addr}) ``` +Console log output for the example above: + +``` +$ env INBUCKET_LOGLEVEL=debug ./inbucket + +1:49PM INF Inbucket starting buildDate=undefined phase=startup version=undefined +1:49PM INF Loading script module=lua path=inbucket.lua phase=startup +1:49PM DBG message at debug level module=lua +1:49PM INF message at info level module=lua +1:49PM WRN message at warn level module=lua +1:49PM ERR message at error level module=lua +1:49PM INF Mapping address to "output@example.com" address=input@example.com module=lua +``` + ## Event trigger: before mail accepted