Software /
code /
prosody-modules
Diff
mod_firewall/README.markdown @ 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 |
parent | 2092:f5d78bc016a6 |
child | 2095:3b4a6d255d7a |
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) +