67 lines
2.2 KiB
PHP
67 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* Akeeba Engine
|
|
*
|
|
* @package akeebaengine
|
|
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
|
* @license GNU General Public License version 3, or later
|
|
*/
|
|
|
|
namespace Akeeba\Engine\Psr\Log;
|
|
|
|
/**
|
|
* This file is part of a privately namespaced copy of PSR-3 version 1.
|
|
*
|
|
* You can find the original PSR-3 in https://www.php-fig.org/psr/psr-3/ and the original code in
|
|
* https://github.com/php-fig/log
|
|
*
|
|
* The license of the original code can be found below.
|
|
*
|
|
* Copyright (c) 2012 PHP Framework Interoperability Group
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
* THE SOFTWARE.
|
|
*/
|
|
|
|
defined('AKEEBAENGINE') || die();
|
|
|
|
/**
|
|
* This Logger can be used to avoid conditional log calls
|
|
*
|
|
* Logging should always be optional, and if no logger is provided to your
|
|
* library creating a NullLogger instance to have something to throw logs at
|
|
* is a good way to avoid littering your code with `if ($this->logger) { }`
|
|
* blocks.
|
|
*/
|
|
class NullLogger extends AbstractLogger
|
|
{
|
|
/**
|
|
* Logs with an arbitrary level.
|
|
*
|
|
* @param mixed $level
|
|
* @param string $message
|
|
* @param array $context
|
|
*
|
|
* @return null
|
|
*/
|
|
public function log($level, $message, array $context = [])
|
|
{
|
|
// noop
|
|
}
|
|
}
|