From 5c7f2f17f9c471d306955df457c7cab4e5c6ed3b Mon Sep 17 00:00:00 2001 From: Snap Date: Thu, 16 Apr 2015 14:51:26 -0700 Subject: Google's OpenID Connect method $google_client_id & $google_client_secret must be added to db.inc.php! --- .../src/Google/Logger/Psr.php | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 includes/google-api-php-client-master/src/Google/Logger/Psr.php (limited to 'includes/google-api-php-client-master/src/Google/Logger/Psr.php') diff --git a/includes/google-api-php-client-master/src/Google/Logger/Psr.php b/includes/google-api-php-client-master/src/Google/Logger/Psr.php new file mode 100644 index 0000000..20104e4 --- /dev/null +++ b/includes/google-api-php-client-master/src/Google/Logger/Psr.php @@ -0,0 +1,93 @@ +setLogger($logger); + } + } + + /** + * Sets the PSR-3 logger where logging will be delegated. + * + * NOTE: The `$logger` should technically implement + * `Psr\Log\LoggerInterface`, but we don't explicitly require this so that + * we can be compatible with PHP 5.2. + * + * @param Psr\Log\LoggerInterface $logger The PSR-3 logger + */ + public function setLogger(/*Psr\Log\LoggerInterface*/ $logger) + { + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function shouldHandle($level) + { + return isset($this->logger) && parent::shouldHandle($level); + } + + /** + * {@inheritdoc} + */ + public function log($level, $message, array $context = array()) + { + if (!$this->shouldHandle($level)) { + return false; + } + + if ($context) { + $this->reverseJsonInContext($context); + } + + $levelName = is_int($level) ? array_search($level, self::$levels) : $level; + $this->logger->log($levelName, $message, $context); + } + + /** + * {@inheritdoc} + */ + protected function write($message, array $context = array()) + { + } +} -- cgit v1.2.3