diff options
author | Andrew Dolgov <[email protected]> | 2007-03-08 18:36:42 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-03-08 18:36:42 +0100 |
commit | 6f9e33e45d7f857f1b8b36c2a8fee261562ceb21 (patch) | |
tree | fb2d51a6273aababe8284476efbea6b6b448b488 /functions.php | |
parent | 06719138737a450eba676864a004e6f4959b39c5 (diff) |
add timestamps to daemon debug output
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/functions.php b/functions.php index f05151369..ee22621ff 100644 --- a/functions.php +++ b/functions.php @@ -39,6 +39,11 @@ require_once "magpierss/rss_fetch.inc"; require_once 'magpierss/rss_utils.inc'; + function _debug($msg) { + $ts = strftime("%H:%M:%S", time()); + print "[$ts] $msg\n"; + } + function purge_feed($link, $feed_id, $purge_interval, $debug = false) { $rows = -1; @@ -90,7 +95,7 @@ } if ($debug) { - print "Purged feed $feed_id ($purge_interval): deleted $rows articles\n"; + _debug("Purged feed $feed_id ($purge_interval): deleted $rows articles"); } } |