/** * @param GoogleGAL_Client $client The current Google client * @param Psr\Log\LoggerInterface $logger PSR-3 logger where logging will be delegated. */ public function __construct(GoogleGAL_Client $client, $logger = null) { parent::__construct($client); if ($logger) { $this->setLogger($logger); } }
/** * {@inheritdoc} */ public function __construct(GoogleGAL_Client $client) { parent::__construct($client); $file = $client->getClassConfig('GoogleGAL_Logger_File', 'file'); if (!is_string($file) && !is_resource($file)) { throw new GoogleGAL_Logger_Exception('File logger requires a filename or a valid file pointer'); } $mode = $client->getClassConfig('GoogleGAL_Logger_File', 'mode'); if (!$mode) { $this->mode = $mode; } $this->lock = (bool) $client->getClassConfig('GoogleGAL_Logger_File', 'lock'); $this->file = $file; }