Better logging for reauth operations
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 15 Jun 2018 07:29:49 +0000 (07:29 +0000)
committerAnomie <bjorsch@wikimedia.org>
Fri, 15 Jun 2018 13:04:26 +0000 (13:04 +0000)
Include username and IP address in log

Change-Id: I25c6d298e50876601ccd6a906eb7a7c65d2e8d87

includes/auth/AuthManager.php

index 161dd56..3260ce4 100644 (file)
@@ -771,7 +771,12 @@ class AuthManager implements LoggerAwareInterface {
                        $status = self::SEC_FAIL;
                }
 
-               $this->logger->info( __METHOD__ . ": $operation is $status" );
+               $this->logger->info( __METHOD__ . ": $operation is $status for '{user}'",
+                       [
+                               'user' => $session->getUser()->getName(),
+                               'clientip' => $this->getRequest()->getIP(),
+                       ]
+               );
 
                return $status;
        }