Get a logger by name.
169009
def get_logger(name):
        """"""
        if name is None:
            return NoLogger()

        logger = logging.getLogger(name)
        if Logger.use_external_configuration:
            logger.propagate = False
        return logger
924644
def get_logger(self, name="deployment-logger", level=logging.DEBUG):
        """"""
        log = logging
        logger = log.getLogger(name)
        fmt = log.Formatter("%(asctime)s %(funcName)s "
                            "%(levelname)s: %(message)s")

        handler = log.StreamHandler(stream=sys.stdout)
        handler.setLevel(level)
        handler.setFormatter(fmt)

        logger.addHandler(handler)
        logger.setLevel(level)

        return logger
51791
def getLogger(name):
    
    def exception(self, msg, *args, **kwargs):
        extra = kwargs.setdefault('extra', {})
        extra['exc_fullstack'] = self.isEnabledFor(logging.DEBUG)
        kwargs['exc_info'] = True
        self.log(logging.ERROR, msg, *args, **kwargs)

    logger = logging.getLogger(name)
    logger.exception = six.create_bound_method(exception, logger)
    return logger
1041682
def get_logger(name):
    

    log = logging.getLogger(name)
    if not log.handlers:
        log.addHandler(NullHandler())
    return log
154758
def get_logger(name="peyotl"):
    
    logger = logging.getLogger(name)
    if len(logger.handlers) == 0:
        log_init_warnings = []
        lc = _read_logging_config(log_init_warnings)
        logger.setLevel(lc['level'])
        if lc['filepath'] is not None:
            log_dir = lc['log_dir']
            if log_dir and not os.path.exists(log_dir):
                os.makedirs(log_dir)
            ch = logging.FileHandler(lc['filepath'])
        else:
            ch = logging.StreamHandler()
        ch.setLevel(lc['level'])
        ch.setFormatter(lc['formatter'])
        logger.addHandler(ch)
        if log_init_warnings:
            for w in log_init_warnings:
                logger.warn(w)
    return logger
1226183
public static synchronized PlatformLogger getLogger(String name) {
        PlatformLogger log = loggers.get(name);
        if (log == null) {
            log = new PlatformLogger(name);
            loggers.put(name, log);
        }
        return log;
    }
427585
def logger():
    """"""
    global _LOGGER
    if _LOGGER is None:
        logging.basicConfig()
        _LOGGER = logging.getLogger()
        _LOGGER.setLevel('INFO')
    return _LOGGER
521878
public static PortLogger getLogger(String name, OutputCollector output) {
    Args.checkNotNull(name, "logger name cannot be null");
    Map<OutputCollector, PortLogger> loggers = PortLoggerFactory.loggers.get(name);
    if (loggers == null) {
      loggers = new HashMap<>();
      PortLoggerFactory.loggers.put(name, loggers);
    }

    PortLogger logger = loggers.get(output);
    if (logger == null) {
      logger = new PortLogger(LoggerFactory.getLogger(name), output);
      loggers.put(output, logger);
    }
    return logger;
  }
450070
public static Logger getLogger(Class<?> cls,
                                   String resourcename,
                                   String loggerName) {
        return createLogger(cls, resourcename, loggerName);
    }
849861
def get_tasklogger(name="TaskLogger"):
    
    try:
        return logging.getLogger(name).tasklogger
    except AttributeError:
        return logger.TaskLogger(name)
581124
public static Logger getLogger(String name) {
        AtomicBoolean logWarning = new AtomicBoolean(false);
        initialized.updateAndGet(initialized -> {
            if (!initialized && !ProviderUtil.hasProviders()) {
                noLogger.set(true);
                logWarning.set(true);
            }
            return true;
        });

        if (noLogger.get()) {
            return loggers.computeIfAbsent(name, key -> {
                Level level = FallbackLoggerConfiguration.isTraceEnabled()
                        ? Level.TRACE
                        : (FallbackLoggerConfiguration.isDebugEnabled() ? Level.DEBUG : Level.INFO);
                Logger logger = new SimpleLogger(name, level, true, false, true, true, "yyyy-MM-dd HH:mm:ss.SSSZ", null,
                                                 new PropertiesUtil(new Properties()), System.out);
                if (logWarning.get()) {
                    logger.info("No Log4j2 compatible logger was found. Using default Javacord implementation!");
                }
                return new PrivacyProtectionLogger(logger);
            });
        } else {
            return new PrivacyProtectionLogger(LogManager.getLogger(name));
        }
    }
827832
def get_logger(name=None):
    

    level = logging.CRITICAL
    if DEBUG:
        logging.disable(logging.NOTSET)
        level = logging.DEBUG

    if name is None:
        name = "<unknown>"

    log = logging.getLogger(name=name)
    log.setLevel( level )
    console = logging.StreamHandler()
    console.setLevel( level )
    log_format = ('[%(asctime)s] [%(levelname)s] [%(module)s:%(lineno)d] (' + str(os.getpid()) + '.%(thread)d) %(message)s' if DEBUG else '%(message)s')
    formatter = logging.Formatter( log_format )
    console.setFormatter(formatter)
    log.propagate = False

    if len(log.handlers) > 0:
        for i in xrange(0, len(log.handlers)):
            log.handlers.pop(0)
    
    log.addHandler(console)
    return log
176919
def getLogger(name, level = logging.INFO):
        
        # create logger
        logger = logging.getLogger(name) 
        logger.setLevel(level)
        # create console handler and set level to debug
        ch = logging.StreamHandler()
        ch.setLevel(level)
        # create formatter
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        # add formatter to ch
        ch.setFormatter(formatter)
        # add ch to logger
        logger.addHandler(ch)
        return logger
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]
1262072
public static Logger getLogger(String name) {
    if (name == null) {
      throw new NullPointerException("Logger name may not be null.");
    }
    init();
    return (instance.internalGetLogger(name));
  }
618995
def getLogger(name="anyconfig"):
    
    logger = logging.getLogger(name)
    logger.addHandler(anyconfig.compat.NullHandler())

    return logger
842645
public Logger getLogger (String name)
    {
        return new Impl(java.util.logging.Logger.getLogger(name));
    }