From 4be9708dce08631e20adfd1a5422b694afbe503d Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Mon, 10 Jan 2011 14:16:51 +0100 Subject: [PATCH] Allow to use the output handler as PEAR logger. --- components/lib/Components/Output.php | 5 +++++ components/lib/Components/Pear/Package.php | 1 + 2 files changed, 6 insertions(+) diff --git a/components/lib/Components/Output.php b/components/lib/Components/Output.php index ecd44f103..679c6b50b 100644 --- a/components/lib/Components/Output.php +++ b/components/lib/Components/Output.php @@ -135,6 +135,11 @@ class Components_Output $this->_cli->fatal($text); } + public function log($status, $text) + { + $this->pear($text); + } + public function pear($text) { if (!$this->_verbose) { diff --git a/components/lib/Components/Pear/Package.php b/components/lib/Components/Pear/Package.php index b99b23670..13ebdd956 100644 --- a/components/lib/Components/Pear/Package.php +++ b/components/lib/Components/Pear/Package.php @@ -357,6 +357,7 @@ class Components_Pear_Package $pkg->_packageInfo['version']['release'] = $version; $pkg->setDate(date('Y-m-d')); $pkg->setTime(date('H:i:s')); + $pkg->setLogger($this->_output); $errors = array(); ob_start(); $old_dir = getcwd(); -- 2.11.0