From: Zach Copley Date: Sat, 18 Jul 2009 01:36:13 +0000 (-0700) Subject: Allow -d (debug logging) command line argument X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9e8bcff5ddfc7d3e5785161078c5b1eaafea2f1e;p=quix0rs-gnu-social.git Allow -d (debug logging) command line argument --- diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php index 248cf86f10..e2ba1d0031 100755 --- a/scripts/twitterstatusfetcher.php +++ b/scripts/twitterstatusfetcher.php @@ -25,19 +25,18 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('MAXCHILDREN', 2); define('POLL_INTERVAL', 60); // in seconds -$shortoptions = 'i::'; -$longoptions = array('id::'); +$shortoptions = 'di::'; +$longoptions = array('id::', 'debug'); $helptext = <<name() . + ': debugging log output enabled.'); + } + do { $flinks = $this->refreshFlinks(); @@ -649,7 +653,9 @@ if (have_option('i')) { $id = null; } -common_debug("id set to $id"); +if (have_option('d') || have_option('debug')) { + define('SCRIPT_DEBUG', true); +} $fetcher = new TwitterStatusFetcher($id); $fetcher->runOnce();