Zwraca logger o określonej nazwie będący implementacją interfejsu
{@link Logger}.

@param <T> Parametr typu klasy loggera.
@param name Nazwa zwracanego logger'a.
@return Logger o wskazanej nazwie.
770547
@SuppressWarnings("unchecked")
	public static <T, L extends LoggerInformer> L getLogger(String name) {
		return (L)SLF4JLoggerFactory.getLogger(name);
	}
593736
private org.apache.log4j.Logger getLogger()
	{
        /*
        Logger interface extends Serializable, thus Log field is
        declared 'transient' and we have to null-check
		*/
		if (logger == null)
		{
			logger = org.apache.log4j.Logger.getLogger(name);
		}
		return logger;
	}
661884
private BuildLogger createLogger() {
        BuildLogger logger;
        if (args.loggerClassname != null) {
            try {
                logger = ClasspathUtils.newInstance(args.loggerClassname, Main.class.getClassLoader(),
                        BuildLogger.class);
            } catch (final BuildException e) {
                printErrorMessage("The specified logger class " + args.loggerClassname + " could not be used because "
                        + e.getMessage());
                throw new RuntimeException();
            }
        } else {
            logger = new DefaultLogger();
            ((DefaultLogger) logger).useColor(args.useColor);
        }

        logger.setMessageOutputLevel(args.msgOutputLevel);
        logger.setOutputPrintStream(out);
        logger.setErrorPrintStream(err);
        logger.setEmacsMode(args.emacsMode);

        return logger;
    }
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;
        }
    }
799675
@CallerSensitive
    public static Logger getAnonymousLogger(String resourceBundleName) {
        LogManager manager = LogManager.getLogManager();
        // cleanup some Loggers that have been GC'ed
        manager.drainLoggerRefQueueBounded();
        // Android-changed: Use VMStack.getStackClass1.
        /* J2ObjC modified.
        Logger result = new Logger(null, resourceBundleName,
                                   VMStack.getStackClass1());
        */
        Logger result = new Logger(null, resourceBundleName, null);
        result.anonymous = true;
        Logger root = manager.getLogger("");
        result.doSetParent(root);
        return result;
    }
1168943
private static String getLogManagerLoggerName(final String name) {
        return (name.equals(RESOURCE_NAME) ? CommonAttributes.ROOT_LOGGER_NAME : name);
    }
481091
static public Log getInstance(String name) {
        Log log = (logs.get(name));
        if (null == log) {
            log = makeNewLogInstance(name);
            Log log2 = logs.putIfAbsent(name, log);
            if (log2 != null) {
                return log2;
            }
        }
        return log;
    }
957279
private function _getLoggerConfig($name)
    {
        if (false === array_key_exists('logger', $this->_config)) {
            throw new MonologCreator\Exception("no logger configuration found");
        }

        if (false === array_key_exists('_default', $this->_config['logger'])) {
            throw new MonologCreator\Exception(
                "no configuration found for logger: _default"
            );
        }

        $loggerConfig = $this->_config['logger']['_default'];

        if (true === array_key_exists($name, $this->_config['logger'])) {
            $loggerConfig  = $this->_config['logger'][$name];
        }

        if (false === array_key_exists('handler', $loggerConfig)) {
            throw new MonologCreator\Exception(
                "no handler configurated for logger: " . $name
            );
        }

        if (false === array_key_exists('level', $loggerConfig)) {
            throw new MonologCreator\Exception(
                "no level configurated for logger: " . $name
            );
        }

        if (false === array_key_exists($loggerConfig['level'], $this->_levels)) {
            throw new MonologCreator\Exception(
                "invalid level: " . $loggerConfig['level']
            );
        }

        return $loggerConfig;
    }
1345980
public static <T> Observable.Transformer<T, T> applyLogging(final String name, final Logger logger){
        return new Observable.Transformer<T, T>() {
            @Override
            public Observable<T> call(Observable<T> observable) {
                return observable
                        .doOnNext(new Action1<T>() {
                            @Override
                            public void call(T t) {
                                logger.log(Log.DEBUG, "[%s] onNext(%s)", name, t);
                            }
                        })
                        .doOnError(new Action1<Throwable>() {
                            @Override
                            public void call(Throwable throwable) {
                                logger.log(throwable, Log.DEBUG, "[%s] onError()", name);
                            }
                        })
                        .doOnCompleted(new Action0() {
                            @Override
                            public void call() {
                                logger.log(Log.DEBUG, "[%s] onCompleted()", name);
                            }
                        });
            }
        };
    }
164950
protected function tap($name, Logger $logger)
    {
        foreach ($this->configurationFor($name)['tap'] ?? [] as $tap) {
            [$class, $arguments] = $this->parseTap($tap);

            $this->app->make($class)->__invoke($logger, ...explode(',', $arguments));
        }

        return $logger;
    }
955601
public void addLog(final String name) {
        ErrorLogger log = new ErrorLogger(name);
        logs.put(name, log);
        log.setVerboseDebug(debugLevel);
    }
1262720
def get_logger(name):
    """"""
    logger = logging.getLogger(name)
    logger.setLevel(getenv('LOGLEVEL', 'INFO'))
    return logger
594823
public static Logger getLogger(String name) {
        ILoggerFactory iLoggerFactory = getILoggerFactory();
        return iLoggerFactory.getLogger(name);
    }
595431
public ErrorLogger getLog(final String name) {
        return hasLog(name) ? logs.get(name) : null;
    }
647075
public static Logger getLogger(final String name, final String resourceBundleName){
		WebContainerLogger tempLogger = map.get(name);
		if (tempLogger==null){
			tempLogger = (WebContainerLogger) AccessController.doPrivileged(
			    new PrivilegedAction<WebContainerLogger>() {
    				public WebContainerLogger run() {
    					return new WebContainerLogger(
    					    Logger.getLogger(name,resourceBundleName),
    					    name, resourceBundleName);
				}
			});
			map.put(name, tempLogger);
		}
			return tempLogger;
	}
653318
public static Logger getConsoleLogger(final String name) {
        return new Logger() {
            @Override
            public void log(String description, Object... params) {
                System.out.print("[" + name + "]: " + description + "\t");
                for (Object param: params)
                    System.out.print(param + "\t");
                System.out.println();
            }
        };
    }
1033103
public static function getLogger($name)
    {
        return Registry::hasLogger($name) ? Registry::getInstance($name) : self::createLogger($name);
    }