Retrieves the logger usable by the controller.
If the logger does not exist yet, get one.

@return the logger.
519325
public Logger logger() {
        if (logger == null) {
            logger = LoggerFactory.getLogger(this.getClass().getName());
        }
        return 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;
    }
572580
public function getLogger() {
		if (is_object($this->logger)) {
			return $this->logger;
		}
		if (property_exists($this,'application') && is_object($this->application)) {
			return $this->application->getLogger();
		}
		return null;
	}
199867
def getLogger(*args, **kwargs):
    
    logger = logging.getLogger(*args, **kwargs)
    if _overrideLogLevel is not None:
        logger.setLevel(logging.NOTSET)
    return logger
160665
def get_logger(logger_name):
    

    # Use default global logger
    if logger_name is None:
        return __instance

    assert isinstance(logger_name, str), 'Logger name must be a string!'

    with __lock:
        if logger_name in __loggers:
            return __loggers[logger_name]

        logger_instance = LogOne(logger_name=logger_name)
        __loggers[logger_name] = logger_instance
        return logger_instance
1079570
public static Logger getLogger()
   {
       if (m_logger == null)
       {
           m_logger = Logger.getLogger(Constant.ROOT_PACKAGE.substring(0, Constant.ROOT_PACKAGE.length() - 1));
           try {
               LogManager logManager = LogManager.getLogManager();
               logManager.reset();//removeAllGlobalHandlers();
               ConsoleHandler fh = new ConsoleHandler();
               fh.setFormatter(new SimpleFormatter());
               // Send logger output to our FileHandler.
               m_logger.addHandler(fh);
           } catch (java.security.AccessControlException ex)    {
               // Access error if running in an applet.
        	   m_logger = Logger.getAnonymousLogger();
           } finally {
               try {
	               // Request that every detail gets logged.
//                 m_logger.setLevel(Level.OFF);
//                   m_logger.setLevel(Level.ALL);
	               m_logger.setLevel(Level.WARNING);        	   
               } catch (java.security.AccessControlException ex)    {
            	   ex.printStackTrace();	// Never
               }
           }
       }
       return m_logger;
   }
1248929
public function getLog()
    {
        if($this->app->exists(LoggerInterface::class)) {
            return $this->app->get(LoggerInterface::class);
        }
        $var_dir = $this->vars_dir . '/log/app.log';
        $logger  = new Logger('log');
        $logger->pushHandler(
            new FingersCrossedHandler(new StreamHandler($var_dir, Logger::DEBUG))
        );
        $this->app->set(LoggerInterface::class, $logger, true);
        return $logger;
    }
239315
public Logger getGlobalLogger() {
      return new Logger(java.util.logging.Logger
                           .getLogger(java.util.logging.Logger.GLOBAL_LOGGER_NAME));
   }
536794
protected function getLogger()
    {
        if ($this->container->has('logger')) {
            $logger = $this->container->get('logger');
            \assert($logger instanceof LoggerInterface);

            return $logger;
        }

        return new NullLogger();
    }
1177356
public Logger getLogger(String name) {
        Logger slf4jLogger = loggerMap.get(name);
        if (slf4jLogger != null) {
            return slf4jLogger;
        } else {
            org.apache.log4j.Logger log4jLogger;
            if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME))
                log4jLogger = LogManager.getRootLogger();
            else
                log4jLogger = LogManager.getLogger(name);

            Logger newInstance = new Log4jLoggerAdapter(log4jLogger);
            Logger oldInstance = loggerMap.putIfAbsent(name, newInstance);
            return oldInstance == null ? newInstance : oldInstance;
        }
    }
154590
public Logger getLogger(Class<?> clazz) {
      if (clazz == null) {
         return getGlobalLogger();
      }
      return getLogger(clazz.getName());
   }
118702
public function getLogger()
    {
        if (!$this->logger) {
            if (!defined('STDERR')) {
                // See testGetLoggerRunFromStdin
                // @codeCoverageIgnoreStart
                define('STDERR', fopen('php://stderr', 'w'));
            }
            // @codeCoverageIgnoreEnd
            $handler = new StreamHandler(STDERR, Logger::DEBUG);
            $handler->setFormatter(new LineFormatter("%datetime% %level_name% %message% %context%\n"));
            $this->logger = new Logger(get_class($this));
            $this->logger->pushHandler($handler);
        }
        return $this->logger;
    }
237361
protected function getLogger()
    {
        if ($this->logger === null) {
            // @todo: Instantiate a webshop specific log object that logs to a separate Acumulus log file.
            $this->logger = new FileLogger(AbstractLogger::DEBUG);
            $this->logger->setFilename(_ROOT_DIR_ . '/'. $logDirectory . '/acumulus.log');
        }
        return $this->logger;
    }
1042749
@Override
    public Logger getLogger(String name) {
        Logger logger = loggerMap.get(name);
        if (logger != null)
            return logger;
        Logger newInstance = new LCLogger(name, LCCore.getApplication().getLoggerFactory().getLogger(name));
        Logger oldInstance = loggerMap.putIfAbsent(name, newInstance);
        return oldInstance == null ? newInstance : oldInstance;
    }
779999
public static LogFactory get() {
		if (null == currentLogFactory) {
			synchronized (lock) {
				if (null == currentLogFactory) {
					currentLogFactory = LogFactory.create();
				}
			}
		}
		return currentLogFactory;
	}
56785
@SuppressWarnings("unchecked")
	public static <T, L extends LoggerInformer> L getLogger(Class<T> clazz) {
		return (L)SLF4JLoggerFactory.getLogger(clazz);
	}
1225550
public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
        try {
            Method getParentLoggerMethod = CommonDataSource.class.getDeclaredMethod("getParentLogger", new Class<?>[0]);
            return (java.util.logging.Logger) getParentLoggerMethod.invoke(delegate, new Object[0]);
        } catch (NoSuchMethodException e) {
            throw new SQLFeatureNotSupportedException(e);
        } catch (InvocationTargetException e2) {
            throw new SQLFeatureNotSupportedException(e2);
        } catch (IllegalArgumentException e2) {
            throw new SQLFeatureNotSupportedException(e2);
        } catch (IllegalAccessException e2) {
            throw new SQLFeatureNotSupportedException(e2);
        }
    }