Refactored Logging environment (cleaned up)

This commit is contained in:
Philipp Holzer 2019-02-28 08:56:28 +01:00 committed by Hypolite Petovan
parent 1b45d3fad7
commit 4810ca570f
6 changed files with 380 additions and 42 deletions

View file

@ -3,6 +3,7 @@
namespace Friendica\Util\Logger;
use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Util\Introspection;
use Friendica\Util\Strings;
use Psr\Log\InvalidArgumentException;
use Psr\Log\LoggerInterface;
@ -75,7 +76,7 @@ class SyslogLogger implements LoggerInterface
private $logLevel;
/**
* The Introspector for the current call
* The Introspection for the current call
* @var Introspection
*/
private $introspection;
@ -87,10 +88,13 @@ class SyslogLogger implements LoggerInterface
private $logUid;
/**
* @param string $channel The output channel
* @param string $level The minimum loglevel at which this logger will be triggered
* @param int $logOpts Indicates what logging options will be used when generating a log message
* @param int $logFacility Used to specify what type of program is logging the message
* @param string $channel The output channel
* @param Introspection $introspection The introspection of the current call
* @param string $level The minimum loglevel at which this logger will be triggered
* @param int $logOpts Indicates what logging options will be used when generating a log message
* @param int $logFacility Used to specify what type of program is logging the message
*
* @throws \Exception
*/
public function __construct($channel, Introspection $introspection, $level = LogLevel::NOTICE, $logOpts = LOG_PID, $logFacility = LOG_USER)
{