From 6f9e33e45d7f857f1b8b36c2a8fee261562ceb21 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 8 Mar 2007 18:36:42 +0100 Subject: add timestamps to daemon debug output --- functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'functions.php') 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"); } } -- cgit v1.2.3-54-g00ecf