# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1458056804 -3600
# Node ID 9d43095d915fecfb9e729b5c1628ff86c8ba0ee0
# Parent  fed0a71a5e6835b468d9080d22698f1f7ffd62be
mod_log_auth: Include username, if known

diff -r fed0a71a5e68 -r 9d43095d915f mod_log_auth/mod_log_auth.lua
--- a/mod_log_auth/mod_log_auth.lua	Tue Mar 15 16:46:02 2016 +0100
+++ b/mod_log_auth/mod_log_auth.lua	Tue Mar 15 16:46:44 2016 +0100
@@ -3,7 +3,7 @@
 
 if mode == "failure" or mode == "all" then
 	module:hook("authentication-failure", function (event)
-		module:log("info", "Failed authentication attempt (%s) from IP: %s", event.condition or "unknown-condition", event.session.ip or "?");
+		module:log("info", "Failed authentication attempt (%s) for user %s from IP: %s", event.condition or "unknown-condition", event.session.username or "?", event.session.ip or "?");
 	end);
 end