diff options
author | Ermal <eri@pfsense.org> | 2013-08-01 10:26:01 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-08-01 10:26:01 +0000 |
commit | 12feed15db5729e9f672e25b76a779a917b6105c (patch) | |
tree | bb162a9aa3b3b0479e1a52770f79512e7349c042 /etc | |
parent | ebea8b08ebe8f6b737b13c0944e7c0739b9a358d (diff) | |
download | pfsense-12feed15db5729e9f672e25b76a779a917b6105c.zip pfsense-12feed15db5729e9f672e25b76a779a917b6105c.tar.gz |
Add Zone to the messages logged on syslog from CP to easy troubleshooting
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 84e432c..3c32ed5 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1180,17 +1180,20 @@ function captiveportal_get_radius_servers() { function captiveportal_logportalauth($user,$mac,$ip,$status, $message = null) { // Log it if (!$message) - $message = "$status: $user, $mac, $ip"; + $message = "{$status}: {$user}, {$mac}, {$ip}"; else { $message = trim($message); - $message = "$status: $user, $mac, $ip, $message"; + $message = "{$status}: {$user}, {$mac}, {$ip}, {$message}"; } captiveportal_syslog($message); } /* log simple messages to syslog */ function captiveportal_syslog($message) { + global $cpzone; + $message = trim($message); + $message .= "Zone: {$cpzone} - {$message}"; openlog("logportalauth", LOG_PID, LOG_LOCAL4); // Log it syslog(LOG_INFO, $message); @@ -1875,7 +1878,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut /* if the pool is empty, return appropriate message and exit */ if (is_null($pipeno)) { portal_reply_page($redirurl, "error", "System reached maximum login capacity"); - log_error("WARNING! Captive portal has reached maximum login capacity"); + log_error("Zone: {$cpzone} - WARNING! Captive portal has reached maximum login capacity"); unlock($cpdblck); return; } |