changeset 2093:7b9520479e99

mod_firewall: README: Document LOG's ability to take meta expressions
author Matthew Wild <mwild1@gmail.com>
date Wed, 16 Mar 2016 11:46:47 +0000
parents f5d78bc016a6
children a1e9ca4cb181
files mod_firewall/README.markdown
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
+