Returns the logger in use by the bot.

@return \Psr\Log\LoggerInterface
557762
public function getLogger()
    {
        if (!$this->logger) {
            $this->logger = $this->getClient()->getLogger();
        }
        return $this->logger;
    }
81837
public function logger()
    {
        if (is_null($this->logger)) {
            $this->logger = app(Logger::class);
        }

        return $this->logger;
    }
543966
protected static function getLoggerId(\Plop\LoggerInterface $logger)
    {
        $func   = $logger->getMethod();
        $cls    = $logger->getClass();
        $ns     = $logger->getNamespace();
        return "$func:$cls:$ns";
    }
35934
protected function newLoggerHandlerImpl()
    {
        $config  = $this->get('config');
        $factory = $config->get('psx_logger_factory');

        if ($factory instanceof \Closure) {
            return $factory($config);
        } else {
            $level = $config->get('psx_log_level');
            $level = !empty($level) ? $level : Logger::ERROR;

            $handler = new ErrorLogHandler(ErrorLogHandler::OPERATING_SYSTEM, $level, true, true);
            $handler->setFormatter(new ErrorFormatter());

            return $handler;
        }
    }
190926
protected function getMonologHandler()
  {
    $name = Str::slug($this->getNamespaceName());
    return (new StreamHandler($this->storagePath("logs/{$name}.log"), Logger::DEBUG))
      ->setFormatter(new LineFormatter(null, null, true, true));
  }
1227634
public static function getILoggerFactory () {
    static $nop;
    if (null === self::$factory) {
      if (null == $nop) {
        $nop = new NOPLoggerFactory();
      }
      return $nop;
    }
    return self::$factory;
  }
571192
public function getLogger($loggerName)
    {

        try {
            // first let's see if we've an application logger registered
            if ($logger = $this->getApplication()->getLogger($loggerName)) {
                return $logger;
            }

            // then try to load the global logger instance if available
            return $this->getApplication()->getNamingDirectory()->search(sprintf('php:global/log/%s', $loggerName));

        } catch (NamingException $ne) {
            // do nothing, we simply have no logger with the requested name
        }
    }
600633
public function getMessageHandler()
    {
        if (null !== $this->messageHandler) {
            return $this->messageHandler;
        }

        return $this->messageHandler = new MessageHandler($this);
    }
1232507
def logger(self):
        
        if self._logger is None:
            self._logger = self.new_logger()
        return self._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;
    }
1047702
public static function getBackend()
    {
        if(!is_object(self::$backend))
        {
            self::$backend = new \Monolog\Logger(self::$name);
            self::$backend->pushHandler(self::getStreamHandler());
            self::setLogFormat(self::$logFormat);
        }
        return self::$backend;
    }
888639
def get_logger():
    
    root = logging.getLogger()
    root.setLevel(logging.WARNING)
    ch = logging.StreamHandler(sys.stderr)
    ch.setLevel(logging.DEBUG)
    formatter = logging.Formatter('%(message)s')
    ch.setFormatter(formatter)
    root.addHandler(ch)
    return root
1050167
static public function log()
    {
        if (!self::$config->logger) {
            self::$config->logger = self::defaultLogger();
        } elseif (self::$config->logger instanceof \Closure) {
            $closure = self::$config->logger;
            self::$config->logger = $closure();
        }

        if (func_num_args()) {
            return self::$config->logger->vars(func_get_args());
        }

        return self::$config->logger;
    }
699697
protected function getHandler(): HandlerInterface
	{
		$handler = new StreamHandler($this->app->getPath() . '/storage/logs/' . date('Y-m-d') . '.mako');

		$formatter = new LineFormatter(null, null, true, true);

		$formatter->includeStacktraces();

		$handler->setFormatter($formatter);

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

		return $this->_logger;
	}
1042360
protected function getLoggedInUser()
    {
        if (!$this->user) {
            $this->user = $this->app->make(User::class);
        }

        return $this->user;
    }
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;
    }