Creates logger depending on configuration.

@return LoggerInterface
172224
public function create() : LoggerInterface
    {
        $loggerType = $this->config['type'] ?? 'null';
        switch ($loggerType) {
            case 'file':
                return new Logger($this->config['path'], $this->config['level']);
            case 'null':
                return new NullLogger;
            default:
                throw new \RuntimeException('Invalid logger type');
        }
    }
1098507
public function getLogger(): IOInterface
    {
        if ($this->_logger === null)
        {
            if ($this->getEvent() !== null)
            {
                $this->_logger = $this->getEvent()->getIO();
            }
            else
            {
                $this->_logger = new \Composer\IO\NullIO();
            }
        }

        return $this->_logger;
    }
8489
public static function create($conf = array(), LoggerInterface $logger = null)
    {
        if (!$conf instanceof ConfigurationInterface) {
            $conf = new Configuration($conf);
        }

        $binaries = $conf->get('mp4box.binaries', array('MP4Box'));

        return static::load($binaries, $logger, $conf);
    }
41210
private function setLogger() {

        $config = $this->getConfig();

        if($config->offsetExists('errors') === true && $config->errors === true) {
            $this->logger = new FileAdapter($this->getConfig()->errorLog);
        }

        return $this;
    }
500616
public function create(): ConfigurationInterface
    {
        $config = $this->detectConfig();
        $config->set('env', $this->environment);

        return $config;
    }
182433
private Logger createLoggerInstance(String loggerName) throws Exception
    {
        Class loggerClass = getConfiguration().getLoggerClass();
        Logger log = (Logger) ClassHelper.newInstance(loggerClass, String.class, loggerName);
        log.configure(getConfiguration());
        return log;
    }
1006689
public function getLogger()
    {
        if ($this->logger === null) {
            if ($this->configuration->get('silent')) {
                $this->logger = new Logger\NullLogger();
            } else {
                $loggerClass = $this->configuration->get('logger') ?: '\\Pinocchio\\Logger\\StandardLogger';
                $loggerOpts  = $this->configuration->get('logger_opts') ?: array();

                $this->logger = new $loggerClass($loggerOpts);
            }
        }

        return $this->logger;
    }
1034751
protected function createLogger()
    {
        $log = new Writer(
            new Monolog('nova'), $this->app['events']
        );

        $this->configureHandler($log);

        return $log;
    }
67417
private function createLogger()
    {
        if ($this->silent) {
            $logger = new SilentLogger();
            self::$msgOutputLevel = Project::MSG_WARN;
        } elseif ($this->loggerClassname !== null) {
            self::import($this->loggerClassname);
            // get class name part
            $classname = self::import($this->loggerClassname);
            $logger = new $classname();
            if (!($logger instanceof BuildLogger)) {
                throw new BuildException($classname . ' does not implement the BuildLogger interface.');
            }
        } else {
            $logger = new DefaultLogger();
        }
        $logger->setMessageOutputLevel(self::$msgOutputLevel);
        $logger->setOutputStream(self::$out);
        $logger->setErrorStream(self::$err);
        $logger->setEmacsMode($this->emacsMode);

        return $logger;
    }
1196739
public function getLogger()
    {
        if (null === $this->logger && \Zend_Registry::isRegistered(self::getNamespace())) {
            $this->setLogger(\Zend_Registry::get(self::getNamespace()));
        }
        
        return $this->logger;
    }
346984
public function getLogger()
    {
        if (is_null($this->logger)) {
            $this->logger = oxNew(\OxidEsales\PayPalModule\Core\Logger::class);
            $this->logger->setLoggerSessionId($this->getSession()->getId());
        }

        return $this->logger;
    }
70982
public function getLogBuilder()
    {
        if (!is_object($this->_logBuilder)) {
            $this->_logBuilder = Yii::createObject($this->_logBuilder);
        }
        return $this->_logBuilder;
    }
417327
public function logger($logger = null)
    {
        if ($logger) {
            $this->_logger = $logger;
        }

        if ($this->_logger) {
            return $this->_logger;
        }

        $this->_logger = new QueryLogger();
        return $this->_logger;
    }
195380
public static function log()
    {
        if (!isset(self::core()->log)) {
            //====================================================================//
            // Initialize Log & Debug
            self::core()->log = new Logger();

            //====================================================================//
            //  Define Standard Messages Prefix if Not Overiden
            if (isset(self::configuration()->localname)) {
                self::core()->log->setPrefix(self::configuration()->localname);
            }
        }

        return self::core()->log;
    }
435289
public static function getLogger()
	{
		if(self::$logger === NULL)
		{
			self::$logger = new Logger('sonic');
			self::$logger->pushHandler(new StreamHandler(Configuration::getLogfile()));
		}
		
		return self::$logger;
	}
83563
private static function logger()
    {
        $settings = [
            'name' => config('app.name'),
            'level' => Logger::DEBUG,
            'path' => storage_path("logs/" . (PHP_SAPI === "cli" ? "cli.log" : "app.log"))
        ];

        $logger = new Logger($settings['name']);
        $handler = new StreamHandler($settings['path']);

        $lineFormatter = new LineFormatter;
        $lineFormatter->includeStacktraces();

        $handler->setFormatter($lineFormatter);

        return $logger->pushHandler($handler, $settings['level']);
    }
196208
public function getLogManager(): ?LogManager
    {
        if (!$this->hasLogManager()) {
            $this->setLogManager($this->getDefaultLogManager());
        }
        return $this->logManager;
    }