获得日志操作句柄

@return \Monolog\Logger
977085
public function getLogger(): MonoLogger
    {
        if ($this->logger === null) {
            $this->logger = new MonoLogger($this->name);
            $this->logger->pushHandler(new StreamHandler($this->logfile));
        }

        return $this->logger;
    }
1121702
protected function _getLogger()
    {
        if ($this->_oLogger === null) {
            $this->_oLogger = new Logger('AmazonPayment');
            $sLogFile = $this->getConfig()->getConfigParam('sShopDir').self::LOG_DIR.'ipn.log';
            $this->_oLogger->pushHandler(new StreamHandler($sLogFile));
        }

        return $this->_oLogger;
    }
1098444
public function getLog()
    {
        if (null == $this->log_unserialized && null !== $this->log) {
            $this->log_unserialized = unserialize($this->log);
        }

        return $this->log_unserialized;
    }
459206
private function createLogger(): LoggerInterface
    {
        $container = $this->iocContainer();
        if (empty($container) || !$container->has(LogsInterface::class)) {
            return new NullLogger();
        }

        //We are using class name as log channel (name) by default
        return $container->get(LogsInterface::class)->getLogger(static::class);
    }
848065
public function log( \Monolog\Logger $logger) {
        $reflection = new \ReflectionClass($this);
        $logger->error($this->getMessage(), [
            'type' => $reflection->getShortName(),
            'code' => $this->getCode(),
            'line' => $this->getLine(),
            'file' => $this->getFile(),
            'trace' => $this->getTrace(),
            'context' => $this->getContext()
        ]);
    }
535699
public function parse()
	{
		if (is_string($this->record->context))
			$this->record->formatted = str_replace("{log-context}", $this->record->context, $this->record->formatted);

		return $this->record;
	}
435289
public static function getLogger()
	{
		if(self::$logger === NULL)
		{
			self::$logger = new Logger('sonic');
			self::$logger->pushHandler(new StreamHandler(Configuration::getLogfile()));
		}
		
		return self::$logger;
	}
243869
protected function registerLogger() : void {
		$this->app->singleton('basset.log', function($app) {
			return new Logger(new \Monolog\Logger('basset'), $app['events']);
		});
	}
557762
public function getLogger()
    {
        if (!$this->logger) {
            $this->logger = $this->getClient()->getLogger();
        }
        return $this->logger;
    }
434276
public function log()
    {
        if (is_null($this->log)) {
            $this->log = app(Log::class);
        }

        return $this->log;
    }
716405
public function getLogger()
    {
        $logger = null;

        if ($this->container && $this->container->has('logger')) {
            $logger = $this->container->get('logger');
        }

        return($logger);
    }
1153528
protected function createEmergencyLogger()
    {
        return new Logger(new Monolog('laravel', $this->prepareHandlers([new StreamHandler(
                $this->app->storagePath().'/logs/laravel.log', $this->level(['level' => 'debug'])
        )])), $this->app['events']);
    }
704233
protected function initLogger(): self
    {
        $settings = $this->container->get("settings");

        $logger = new Logger($settings["logger"]["channel"]);
        $logger->pushHandler(new $settings["logger"]["class"][0](...$settings["logger"]["class"][1]));

        $this->container->set("core-logger", $logger);
        return $this;
    }
70982
public function getLogBuilder()
    {
        if (!is_object($this->_logBuilder)) {
            $this->_logBuilder = Yii::createObject($this->_logBuilder);
        }
        return $this->_logBuilder;
    }
1373738
public function getDafaultLogger () {
    if (null === $this->root) {
      $this->root = new HierarchialLogger(null);
    }
    return $this->root;
  }
88726
protected function _loggerSanity()
    {
        if (!isset($this->_directives['logging']) || !$this->_directives['logging']) {
            return;
        }

        if (isset($this->_directives['logger'])) {
            if ($this->_directives['logger'] instanceof Zend_Log) {
                return;
            }
            Zend_Cache::throwException('Logger object is not an instance of Zend_Log class.');
        }

        // Create a default logger to the standard output stream
        // require_once 'Zend/Log.php';
        // require_once 'Zend/Log/Writer/Stream.php';
        // require_once 'Zend/Log/Filter/Priority.php';
        $logger = new Zend_Log(new Zend_Log_Writer_Stream('php://output'));
        $logger->addFilter(new Zend_Log_Filter_Priority(Zend_Log::WARN, '<='));
        $this->_directives['logger'] = $logger;
    }
1286531
public static function getLogger()
    {
        if (self::$logger === null)
        {
            try
            {
                $result = Hook::execute(
                    "Wedeto.Util.GetLogger", 
                    ["logger" => null, "class" => static::class]
                );
            }
            catch (RecursionException $e)
            {
                // Apparently the hook is calling getLogger which is failing, so
                // use an emergency logger to log anyway.
                $result = ['logger' => new EmergencyLogger];
            }

            self::$logger = $result['logger'] ?? new NullLogger();
        }
        return self::$logger;
    }