Mercurial > prosody-modules
changeset 3941:6d1ec8099315
mod_log_auth: log hostname, too
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Tue, 10 Mar 2020 20:42:27 +0100 (2020-03-10) |
parents | 675726ab06d3 |
children | e93e58b33bf6 |
files | mod_log_auth/mod_log_auth.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_log_auth/mod_log_auth.lua Sun Mar 08 20:00:23 2020 +0100 +++ b/mod_log_auth/mod_log_auth.lua Tue Mar 10 20:42:27 2020 +0100 @@ -6,14 +6,14 @@ module:hook("authentication-failure", function (event) local session = event.session; local username = session.username or session.sasl_handler and session.sasl_handler.username or "?"; - session.log("info", "Failed authentication attempt (%s) for user %s from IP: %s", - event.condition or "unknown-condition", username, session.ip or "?"); + session.log("info", "Failed authentication attempt (%s) for user %s@%s from IP: %s", + event.condition or "unknown-condition", username, module.host, session.ip or "?"); end); end if mode == "success" or mode == "all" then module:hook("authentication-success", function (event) local session = event.session; - session.log("info", "Successful authentication as %s from IP: %s", session.username, session.ip or "?"); + session.log("info", "Successful authentication as %s@%s from IP: %s", session.username, module.host, session.ip or "?"); end); end