From 696fcd7ce4d495e356667019493bf312e2a6e47b Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 10 Nov 2016 20:52:35 +0100 Subject: add log class --- src/phinde/Queue.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/phinde/Queue.php') diff --git a/src/phinde/Queue.php b/src/phinde/Queue.php index 6c30faa..a58a257 100644 --- a/src/phinde/Queue.php +++ b/src/phinde/Queue.php @@ -13,9 +13,11 @@ class Queue public function addToProcessList($linkUrl, $actions) { - echo "Queuing for processing: $linkUrl" + Log::info( + "Queuing for processing: $linkUrl" . ' (' . implode(',', $actions) . ')' - . "\n"; + ); + $this->gmclient->doBackground( $GLOBALS['phinde']['queuePrefix'] . 'phinde_process', serialize( @@ -26,9 +28,11 @@ class Queue ) ); if ($this->gmclient->returnCode() != GEARMAN_SUCCESS) { - echo 'Error queueing URL processing for ' + Log::error( + 'Error queueing URL processing for ' . $linkUrl . "\n" - . 'Error code: ' . $this->gmclient->returnCode() . "\n"; + . 'Error code: ' . $this->gmclient->returnCode() + ); exit(2); } } -- cgit v1.2.3