# HG changeset patch # User Matthew Wild # Date 1458128807 0 # Node ID 7b9520479e9995133967684e993bc4410c451634 # Parent f5d78bc016a620e3dbac419bdcaa5bd9586c8c21 mod_firewall: README: Document LOG's ability to take meta expressions diff -r f5d78bc016a6 -r 7b9520479e99 mod_firewall/README.markdown --- a/mod_firewall/README.markdown Wed Mar 16 11:46:20 2016 +0000 +++ b/mod_firewall/README.markdown Wed Mar 16 11:46:47 2016 +0000 @@ -310,3 +310,13 @@ Action Description --------------- ------------------------------------------------------------------------------------------------------------------------ `LOG=message` Logs the given message to Prosody's log file. Optionally prefix it with a log level in square brackets, e.g. `[debug]` + +You can include expressions in log messages, using `$(...)` syntax. For example, to log the stanza that matched the rule, you can use $(stanza), +or to log just the top tag of the stanza, use $(stanza:top_tag()). + +Example: + + # Log all stanzas to user@example.com: + TO: user@example.com + LOG=[debug] User received: $(stanza) +