Only output to logger.
@param  bool|null $loggerOnly
@return null|bool
330748
public function loggerOnly($loggerOnly = null)
    {
        if (func_num_args() == 0) {
            return $this->loggerOnly;
        }

        $this->loggerOnly = (bool) $loggerOnly;
    }
81837
public function logger()
    {
        if (is_null($this->logger)) {
            $this->logger = app(Logger::class);
        }

        return $this->logger;
    }
266455
public function getLogger() {
		if ($this->_logger !== null) {
			return $this->_logger;
		}
		
		$factoryFirst = $this->isTryLoggersFactoryFirst();
		
		if ($factoryFirst) {
			try {
				$logger = $this->_createLogger();
			} catch (Exception $exception) {}
		}
		
		if (empty($logger)) {
			try {
				$logger = $this->_getLogger();
			} catch (Exception $exception) {}
		}
		
		if (! $factoryFirst && empty($logger)) {
			try {
				$logger = $this->_createLogger();
			} catch (Exception $exception) {}
		}
		
		if (empty($logger)) {
			throw new NoLogger('Unable to provide a logger', 0, $exception);
		}
		
		if (! $logger instanceof LoggerInterface) {
			throw new NoLogger('Logger must implement the "LoggerInterface"');
		}
				
		$this->_logger = $logger;
		return $logger;
	}
251807
public Logger get_logger() {
	if (logger == null) {
	    logger = Logger.getLogger(get_name().toLowerCase());
	    logger.setAdditivity(false);
	    logger.setLevel(Level.WARN);
	    last_level = Level.WARN;
	}
	return logger;
    }
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);
    }
1035844
public function logger($instance = null)
    {
        deprecationWarning(
            'Connection::logger() is deprecated. ' .
            'Use Connection::setLogger()/getLogger() instead.'
        );
        if ($instance === null) {
            return $this->getLogger();
        }

        $this->setLogger($instance);
    }
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;
    }
571657
public function outputOnlyIfCommandLine($outputOnlyIfCommandLine = null)
    {
        if (func_num_args() == 0) {
            return $this->outputOnlyIfCommandLine;
        }
        $this->outputOnlyIfCommandLine = (bool) $outputOnlyIfCommandLine;
    }
536794
protected function getLogger()
    {
        if ($this->container->has('logger')) {
            $logger = $this->container->get('logger');
            \assert($logger instanceof LoggerInterface);

            return $logger;
        }

        return new NullLogger();
    }
1325600
public function logger()
	{
		if(!isset($this->_logger))
		{
			$this->_logger = new Logging\LoggerMultiplexer();
		}

		return $this->_logger;
	}
1166258
protected function getLogglyHandler()
    {
        $token = Arr::path($this->config, 'loggly.token');

        if (! $token) {
            throw new ConfigException('Loggly is enabled but the token is not set.');
        }

        return new LogglyHandler($token, Logger::INFO);
    }
475998
protected function render_report_loglive(report_loglive_renderable $reportloglive) {
        if (empty($reportloglive->selectedlogreader)) {
            return null;
        }
        $table = $reportloglive->get_table(true);
        return $table->out($reportloglive->perpage, false);
    }
43152
public static function setLogEnabled(bool $logEnabled): void {
        if ($logEnabled) {
            self::setLogLevel(self::$level);
        } else {
            self::setLogLevel(Logger::OFF);
        }
    }
677643
private function configureLogger(\n2n\log4php\Logger $logger, $config) {
		$loggerName = $logger->getName();
		
		// Set logger level
		if (isset($config['level'])) {
			$level = \n2n\log4php\LoggerLevel::toLevel($config['level']);
			if (isset($level)) {
				$logger->setLevel($level);
			} else {
				$this->warn("Invalid level value [{$config['level']}] specified for logger [$loggerName]. Ignoring level definition.");
			}
		}
		
		// Link appenders to logger
		if (isset($config['appenders'])) {
			foreach($config['appenders'] as $appenderName) {
				if (isset($this->appenders[$appenderName])) {
					$logger->addAppender($this->appenders[$appenderName]);
				} else {
					$this->warn("Nonexistnant appender [$appenderName] linked to logger [$loggerName].");
				}
			}
		}
		
		// Set logger additivity
		if (isset($config['additivity'])) {
			try {
				$additivity = \n2n\log4php\option\OptionConverter::toBooleanEx($config['additivity'], null);
				$logger->setAdditivity($additivity);
			} catch (Exception $ex) {
				$this->warn("Invalid additivity value [{$config['additivity']}] specified for logger [$loggerName]. Ignoring additivity setting.");
			}
		}
	}
82954
protected function _log($textLine, $logPath=null)
    {
        // Return back to console also
        $this->_print($textLine);
        
        $logPath = ($logPath) ? $logPath : $this->logPath;

        if ($logPath)
            return file_put_contents($logPath, $this->_formatTextLine($textLine), FILE_APPEND);
        else
            return false;
    }
19000
public function setLogger(LoggerInterface $logger)
    {
        $this->logger = $logger;

        if ($this->stream instanceof LoggerAwareInterface) {
            $this->stream->setLogger($this->getLogger());
        }

        return $this;
    }
41290
public function dumpTo(LoggerInterface $logger)
    {
        if (empty($this->sessionLog)) {
            return $this;
        }

        $logger->write(new LogRecord(null, "=== Detailed session log dump begin ==================", null));
        foreach ($this->sessionLog as $record) {
            $logger->write($record); // historical log dumped with actual event times
        }
        $logger->write(new LogRecord(null, "=== Detailed session log dump end ====================", null));

        return $this;
    }