Rev 1197 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1197 | Rev 1345 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | } |
64 | } |
65 | $users_info = count($users_names) == 0 ? '' : ' ('._L('affected users: %1',implode(', ',$users_names)).')'; |
65 | $users_info = count($users_names) == 0 ? '' : ' ('._L('affected users: %1',implode(', ',$users_names)).')'; |
66 | $objects_info = count($objects_names) == 0 ? '' : ' ('._L('affected objects: %1',implode(', ',$objects_names)).')'; |
66 | $objects_info = count($objects_names) == 0 ? '' : ' ('._L('affected objects: %1',implode(', ',$objects_names)).')'; |
67 | 67 | ||
68 | $ts = date('Y-m-d H:i:s'); |
68 | $ts = date('Y-m-d H:i:s'); |
69 | $addr = $_SERVER['REMOTE_ADDR'] ?? _L('unknown'); |
69 | $addr = OIDplus::getClientIpAddress() ?: _L('unknown'); |
70 | 70 | ||
71 | // Note: $ts was put into brackets, because there is probably a bug in fail2ban that does not allow the date/time being at offset 0 |
71 | // Note: $ts was put into brackets, because there is probably a bug in fail2ban that does not allow the date/time being at offset 0 |
72 | // "WARNING Found a match for '020-05-11 22:50:58 [192.168.69.89] Failed login ..." |
72 | // "WARNING Found a match for '020-05-11 22:50:58 [192.168.69.89] Failed login ..." |
73 | $line = "[$ts] [$addr] ".$event->getMessage().$users_info.$objects_info; |
73 | $line = "[$ts] [$addr] ".$event->getMessage().$users_info.$objects_info; |
74 | 74 |