Creates a logger with the below attributes.
    :param str name: Name of the logger
    :return obj: Logger
967776
def create_logger(name):
    
    logging.config.dictConfig({
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'simple': {
                'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
            },
            'detailed': {
                'format': '%(asctime)s %(module)-17s line:%(lineno)-4d '
                          '%(levelname)-8s %(message)s'
            },
            'email': {
                'format': 'Timestamp: %(asctime)s\nModule: %(module)s\n'
                          'Line: %(lineno)d\nMessage: %(message)s'
            },
        },
        'handlers': {
            # 'stream': {
            #     'level': 'DEBUG',
            #     'class': 'logging.StreamHandler',
            #     "formatter": "simple"
            # },
            "file": {
                "level": "DEBUG",
                "formatter": "simple",
                "class": "logging.handlers.RotatingFileHandler",
                "filename": "debug.log",
                'mode': 'a',
                'maxBytes': 30000,
                'backupCount': 0
            }
        },
        'loggers': {
            '': {
                # "handlers": ["stream", "file"],
                "handlers": ["file"],
                "level": "DEBUG",
                'propagate': True
            }
        }
    })
    return logging.getLogger(name)
1321440
public Logger getLogger(String name) {
        // the root logger is called "" in JUL
        if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) {
            name = "";
        }

        Logger slf4jLogger = loggerMap.get(name);
        if (slf4jLogger != null)
            return slf4jLogger;
        else {
            java.util.logging.Logger julLogger = java.util.logging.Logger.getLogger(name);
            Logger newInstance = new JDK14LoggerAdapter(julLogger);
            Logger oldInstance = loggerMap.putIfAbsent(name, newInstance);
            return oldInstance == null ? newInstance : oldInstance;
        }
    }
1143636
def createLogger(name, level=logging.WARNING):
    """"""
    logger = logging.getLogger(name)
    logger.setLevel(level)
    handler = logging.StreamHandler()
    handler.setFormatter(logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s'))
    logger.addHandler(handler)
    logger.propagate = False
    return logger
424687
def log_to(logger):
    
    logger_id = id(logger)

    def decorator(function):
        func = add_label(function, 'log_to', logger_id=logger_id)
        return func
    return decorator
176391
def logger_new (self, loggername, **kwargs):
        """"""
        args = self[loggername]
        args.update(kwargs)
        return self.loggers[loggername](**args)
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
837049
public static ILogger getLogger(String name) {
        // try the fast path first
        LoggerFactory existingFactory = loggerFactory;
        if (existingFactory != null) {
            return existingFactory.getLogger(name);
        }

        synchronized (FACTORY_LOCK) {
            existingFactory = loggerFactory;
            if (existingFactory != null) {
                return existingFactory.getLogger(name);
            }

            LoggerFactory createdFactory = null;

            final String loggingClass = System.getProperty("hazelcast.logging.class");
            if (!StringUtil.isNullOrEmpty(loggingClass)) {
                createdFactory = tryToCreateLoggerFactory(loggingClass);
            }

            if (createdFactory != null) {
                // hazelcast.logging.class property overrides everything, so it's safe to store the factory for reuse
                loggerFactory = createdFactory;
                loggerFactoryClassOrType = loggingClass;
            } else {
                final String loggingType = System.getProperty("hazelcast.logging.type");
                createdFactory = createLoggerFactory(loggingType);

                if (!StringUtil.isNullOrEmpty(loggingType)) {
                    // hazelcast.logging.type property is the recommended way of configuring the logging, in most setups
                    // the configured value should match with the value passed to newLoggerFactory(), so we store the created
                    // factory for reuse
                    loggerFactory = createdFactory;
                    loggerFactoryClassOrType = loggingType;
                }
            }

            return createdFactory.getLogger(name);
        }
    }
874335
def get_logger(cls, custom_name=None):
        """"""
        name = custom_name or cls.get_name()
        return logging.getLogger(name)
1060054
private static Logger getOrCreateLogger(final String name) {
		if (name == null || name.length() == 0) {
			return root;
		} else {
			Logger logger = loggers.get(name);
			if (logger == null) {
				Logger parent = getOrCreateLogger(reduce(name));
				logger = new Logger(parent, name);
				loggers.put(name, logger);
			}
			return logger;
		}
	}
658684
def get_logger(name=None, format_string=None):
    
    logging.captureWarnings(True)
    log = logging.getLogger(name)

    # Bind custom method to instance.
    # Source: https://stackoverflow.com/a/2982
    log.set_debug_level = _set_debug_level.__get__(log)
    log.set_debug_level(0)

    if not format_string:
        format_string = '[%(module)s]\t%(levelname)s\t%(message)s'

    # Setting up log formats
    log.handlers = []
    handler = logging.StreamHandler(sys.stderr)
    handler.setFormatter(
        logging.Formatter(format_string),
    )
    log.addHandler(handler)

    return log
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
450070
public static Logger getLogger(Class<?> cls,
                                   String resourcename,
                                   String loggerName) {
        return createLogger(cls, resourcename, loggerName);
    }
435705
def initLogger(name):  # pylint: disable=invalid-name
    '''
    
    '''
    logger = logging.getLogger(name)
    logger.setLevel(logging.INFO)
    # Skip attaching StreamHandler if one is already attached to logger
    if not getattr(logger, "streamhandler_set", None):
        consolehandler = logging.StreamHandler()
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        consolehandler.setFormatter(formatter)
        consolehandler.setLevel(logging.INFO)
        logger.addHandler(consolehandler)
        logger.streamhandler_set = True
    return logger
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
686001
private Logger internalGetLogger(String name) {
    assert name != null : "Name was null";
    Logger rv = instances.get(name);

    if (rv == null) {
      Logger newLogger = null;
      try {
        newLogger = getNewInstance(name);
      } catch (Exception e) {
        throw new RuntimeException("Problem getting logger", e);
      }
      Logger tmp = instances.putIfAbsent(name, newLogger);
      // Return either the new logger we've just made, or one that was
      // created while we were waiting
      rv = tmp == null ? newLogger : tmp;
    }

    return (rv);
  }
1151711
def _create_logger(middleware_settings):
    
    if django_settings.DEBUG:
        level = logging.DEBUG
        formatter = logging.Formatter(
            middleware_settings['LOGGER_FORMAT_DEBUG'])
    else:
        level = middleware_settings['LOGGER_LEVEL']
        formatter = logging.Formatter(middleware_settings['LOGGER_FORMAT'])

    handler = logging.StreamHandler(sys.stderr)
    handler.setLevel(level)
    handler.setFormatter(formatter)

    logger = logging.getLogger(middleware_settings['LOGGER_NAME'])

    # If in some strange way this logger already exists we make sure to delete
    # its existing handlers
    del logger.handlers[:]

    logger.addHandler(handler)

    # Disable propagation by default
    logger.propagate = False

    return 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;
    }