1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

logging example output

James Hillyerd
2023-11-13 13:53:25 -08:00
parent 1c3f37b4b4
commit 8889630aaa

@@ -29,6 +29,20 @@ local new_addr = "output@example.com"
logger.info(string.format("Mapping address to %q", new_addr), {address = orig_addr}) 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 ## Event trigger: before mail accepted