diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-04-01 21:19:24 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-04-01 21:19:24 +0000 |
commit | 0c247ed596f43e3476bf058abe6a0cd49e09157f (patch) | |
tree | 2d41198e8e8e665261507163d519945a12d7982a /etc/inc | |
parent | 3db435180b35bcba69b11f85bf54a64c27cd58c4 (diff) | |
download | pfsense-0c247ed596f43e3476bf058abe6a0cd49e09157f.zip pfsense-0c247ed596f43e3476bf058abe6a0cd49e09157f.tar.gz |
Add logging helper statements
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index edbd190..6913c0e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -583,9 +583,12 @@ function tdr_day($schedule) { $weekday = 7; $date = date("d"); $defined_days = split(",", $schedule); + log_error("[TDR DEBUG] tdr_day($schedule)"); foreach($defined_days as $dd) { - if($date == $dd) + if($date == $dd) { + log_error("[TDR DEBUG] tdr_day($schedule) returning true"); return true; + } } return false; } @@ -597,10 +600,11 @@ function tdr_hour($schedule) { $starting_time = strtotime($tmp[0]); $ending_time = strtotime($tmp[1]); $now = strtotime("now"); - if($debug) - echo "S: $starting_time E: $ending_time N: $now \n"; - if($now >= $starting_time and $now <= $ending_time) + log_error("[TDR DEBUG] S: $starting_time E: $ending_time N: $now \n"); + if($now >= $starting_time and $now <= $ending_time) { + log_error("[TDR DEBUG] tdr_hour() returning true \n"); return true; + } return false; } @@ -614,12 +618,15 @@ function tdr_position($schedule) { */ global $debug; $weekday = date("w"); + log_error("[TDR DEBUG] tdr_position($schedule) $weekday"); if ($weekday == 0) $weekday = 7; $schedule_days = split(",", $schedule); foreach($schedule_days as $day) { - if($day == $weekday) + if($day == $weekday) { + log_error("[TDR DEBUG] tdr_position() returning true $day"); return true; + } } return false; } @@ -631,9 +638,12 @@ function tdr_month($schedule) { global $debug; $todays_month = date("n"); $months = split(",", $schedule); + log_error("[TDR DEBUG] tdr_month($schedule)"); foreach($months as $month) { - if($month == $todays_month) + if($month == $todays_month) { + log_error("[TDR DEBUG] tdr_month($schedule) is returning true $todays_month - $month"); return true; + } } return false; } |