creates the custom output steam appender and returns the name

@param name
@param pattern
@param encoding
@param loggerNames
@param levelStr
@return
@since 1.1.1
548168
public String createOutputStreamAppender(String name, String pattern, String encoding, Collection<String> loggerNames, 
			String levelStr, boolean recursive, boolean overrideLogLevel) {
		Level level = getLevel(levelStr);
		String encodingToUse = StringUtils.isEmpty(encoding) ? "UTF-8" : encoding;
		PatternLayout layout = PatternLayout.newBuilder()
				.withPattern(StringUtils.isEmpty(pattern) ? DEFAULT_PATTERN : pattern)
				.withCharset(Charset.forName(encodingToUse))
				.build();
		
		String appenderName = StringUtils.isEmpty(name) ? UUID.randomUUID().toString() : name;
		
		AdminToolLog4j2OutputStream baos = new AdminToolLog4j2OutputStream(4096, encodingToUse);
		outputStreams.put(appenderName, baos);
		
		OutputStreamAppender appender = OutputStreamAppender.newBuilder()
				.setName(appenderName)
				.setTarget(baos)
				.setLayout(layout)
				.setFollow(false)
				.build();
		
		appender.start();
		
		final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
		final Configuration config = ctx.getConfiguration();
		config.addAppender(appender);
		
		Collection<String> parentLoggerNames = getParentLoggerNames();
		
		Map<String, LoggerConfig> configs = getRecursiveLoggerConfigs(loggerNames, recursive, config);
		configs.entrySet().forEach(configEntry ->{
			configEntry.getValue().addAppender(appender, level, null);
			if (overrideLogLevel) {
				baos.addOriginalLevel(configEntry.getKey(), configEntry.getValue().getLevel());
				changeLogger(configEntry.getKey(), level, parentLoggerNames.contains(configEntry.getKey()));
			}
		});
		
		ctx.updateLoggers();
		return appenderName;
	}
1362723
public static String name(String name, String... names) {
        final StringBuilder builder = new StringBuilder();
        append(builder, name);
        if (names != null) {
            for (String s : names) {
                append(builder, s);
            }
        }
        return builder.toString();
    }
591012
public void expectRegex(String name, Pattern pattern) {
        expectRegex(name, pattern, messages.get(Validation.REGEX_KEY.name(), name));
    }
167108
public static StreamEncoder forOutputStreamWriter(OutputStream out,
                                                      Object lock,
                                                      String charsetName)
        throws UnsupportedEncodingException
    {
        String csn = charsetName;
        if (csn == null)
            csn = Charset.defaultCharset().name();
        try {
            if (Charset.isSupported(csn))
                return new StreamEncoder(out, lock, Charset.forName(csn));
        } catch (IllegalCharsetNameException x) { }
        throw new UnsupportedEncodingException (csn);
    }
641051
def create_logger(name, formatter=None, handler=None, level=None):
    
    logger = logging.getLogger(name)

    #: remove existing handlers
    logger.handlers = []

    #: use a standard out handler
    if handler is None:
        handler = logging.StreamHandler(sys.stdout)

    #: set the formatter when a formatter is given
    if formatter is not None:
        handler.setFormatter(formatter)

    #: set DEBUG level if no level is specified
    if level is None:
        level = logging.DEBUG

    handler.setLevel(level)
    logger.setLevel(level)
    logger.addHandler(handler)
    return logger
953695
private static String getNamedOutputFormatInstanceFile(JobContext job, String namedOutput) {
		return job.getConfiguration().get(MO_PREFIX + namedOutput + FORMAT_INSTANCE_FILE, null);
	}
848476
private static Appender<ILoggingEvent> getStdErrAppender(final LoggerContext context,
                                                           final ReplaceNewLines replaceNewLines) {

    // Setup format
    final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
    encoder.setContext(context);
    encoder.setPattern(
        "%date{HH:mm:ss.SSS} %property{ident}[%property{pid}]: %-5level [%thread] %logger{0}: "
            + ReplaceNewLines.getMsgPattern(replaceNewLines) + "%n");
    encoder.setCharset(Charsets.UTF_8);
    encoder.start();

    // Setup stderr appender
    final ConsoleAppender<ILoggingEvent> appender = new ConsoleAppender<ILoggingEvent>();
    appender.setTarget("System.err");
    appender.setName("stderr");
    appender.setEncoder(encoder);
    appender.setContext(context);
    appender.start();

    return appender;
  }
1097253
function (name, loggerContext) {
    /**
     * Logger name
     */
    this.name = name;

    /**
     * Reference to the logger context that created this logger
     *
     * The reference is used to create appenders and layouts when
     * configuration is applied.
     */
    this.loggerContext = loggerContext;

    /**
     * Parent logger. All loggers have a parent except the root logger
     */
    this.parent = null;

    /**
     * Children loggers. Mostly used during initialization to propagate
     * the configuration.
     */
    this.children = [];

    /**
     * Appenders associated with the logger. Set during initialization
     */
    this.appenders = [];

    /**
     * Logger filter. Set during initialization
     */
    this.filter = null;

    /**
     * The trace level of the logger. Log events whose level is below that
     * level are logged. Others are discarded.
     */
    this.level = 'inherit';

    /**
     * Additivity flag. Log events are not propagated to the parent logger
     * if the flag is not set.
     */
    this.additive = true;

    /**
     * Function used to determine whether a log level is below the
     * trace level of the logger
     */
    if (this.loggerContext) {
      this.isBelow = function (level, referenceLevel) {
        return this.loggerContext.logLevel.isBelow(level, referenceLevel);
      };

      // Set trace functions for all registered levels
      utils.each(this.loggerContext.logLevel.getLevels(), function (level) {
        var self = this;
        if (!this[level]) {
          this[level] = function () {
            self.traceAtLevel(level, arguments);
          };
        }
      }, this);
    }
    else {
      this.isBelow = function () {
        return true;
      };
    }
  }
807275
public void setName(String pattern)
    throws ConfigException, PatternSyntaxException
  {
    CharBuffer cb = new CharBuffer();

    cb.append("^");

    int i = 0;
    int length = pattern.length();

    while (i < length && pattern.charAt(i) == '/')
      i++;

    for (; i < length; i++) {
      char ch = pattern.charAt(i);

      if (ch == '/') {
        cb.append('/');
      }
      else if (ch == '.') {
        cb.append("\\.");
      }
      else if (ch != '*') {
        cb.append(ch);
      }
      else if (length <= i + 1 || pattern.charAt(i + 1) != '*') {
        cb.append("[^/]*");
      }
      else if (i > 0 && pattern.charAt(i - 1) != '/') {
        throw new ConfigException(L.l("'{0}' is an invalid pattern at '**'",
                                      pattern));
      }
      else if (i + 2 < length && pattern.charAt(i + 2) == '/') {
        cb.append("([^/]*/)*");
        i += 2;
      }
      else if (i + 2 < length) {
        throw new ConfigException(L.l("'{0}' is an invalid pattern at '**'",
                                      pattern));
      }
      else {
        cb.append(".*");
        i++;
      }
    }

    cb.append("$");

    _pattern = Pattern.compile(cb.toString());
  }
810235
public static <C> SLF4JLogTemplate<C> toSLF4J(String loggerName, String levelName) {
		return toSLF4J(loggerName, levelName, null);
	}
757370
def init_log(logger, filename=None, loglevel=None):
    
    
    formatter = logging.Formatter(
                    '[%(asctime)s] %(levelname)s: %(name)s: %(message)s'
                )
    
    if loglevel:
        logger.setLevel(getattr(logging, loglevel))

    # We will allways print warnings and higher to stderr
    ch = logging.StreamHandler()
    ch.setLevel('WARNING')
    ch.setFormatter(formatter)
    
    if filename:
        fi = logging.FileHandler(filename, encoding='utf-8')
        if loglevel:
            fi.setLevel(getattr(logging, loglevel))
        fi.setFormatter(formatter)
        logger.addHandler(fi)
    # If no logfile is provided we print all log messages that the user has 
    # defined to stderr
    else:
        if loglevel:
            ch.setLevel(getattr(logging, loglevel))

    logger.addHandler(ch)
1262072
public static Logger getLogger(String name) {
    if (name == null) {
      throw new NullPointerException("Logger name may not be null.");
    }
    init();
    return (instance.internalGetLogger(name));
  }
362685
function Logger (level, name) {
  if (name) {
    debug = require('debug')(typeof name === 'string' ? name : 'vxx');
  }
  this.level = level;
  this.debug('Logger started');
}
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
356326
public CustomFormatter create(final String pattern) {
        
        final CustomFormatTokenizer tokenizer = new CustomFormatTokenizer();
        final TokenStore allStore = tokenizer.parse(pattern);
        if(allStore.getTokens().isEmpty()) {
            // 標準のフォーマッタ
            return CustomFormatter.DEFAULT_FORMATTER;
            
        } else if(pattern.equalsIgnoreCase("General")) {
            return CustomFormatter.DEFAULT_FORMATTER;
        }
        
        // セクション単位に分割し、処理していく。
        final List<TokenStore> sections = allStore.split(Token.SYMBOL_SEMI_COLON);
        if(sections.size() > 4) {
            throw new CustomFormatterParseException(pattern,
                    String.format("section size over 4. but '%s' number of %d secitions.", pattern, sections.size()));
        }
        
        final CustomFormatter formatter = new CustomFormatter(pattern);
        boolean containsTextFormatter = false;
        for(TokenStore section : sections) {
            
            final ConditionFormatter conditionFormatter;
            if(textFormatterFactory.isTextPattern(section)) {
                conditionFormatter = textFormatterFactory.create(section);
                containsTextFormatter = true;
                
            } else if(dateFormatterFactory.isDatePattern(section)) {
                conditionFormatter = dateFormatterFactory.create(section);
                
            } else if(numberFormatterFactory.isNumberPattern(section)) {
                conditionFormatter = numberFormatterFactory.create(section);
                
            } else {
                conditionFormatter = numberFormatterFactory.create(section);
                
            }
            
            formatter.addConditionFormatter(conditionFormatter);
            
        }
        
        // 条件式の設定
        int sectionSize = sections.size();
        if(containsTextFormatter) {
            // 文字列の書式を含む場合は、個数から除外する。
            sectionSize--;
        }
        
        // 1番目の書式がデフォルトの条件の場合
        boolean hasConditionFirst = false;
        
        for(int i=0; i < sectionSize; i++) {
            
            final ConditionFormatter conditionFormatter = formatter.getConditionFormatters().get(i);
            if(conditionFormatter.getOperator() != null) {
                if(i == 0) {
                    hasConditionFirst = true;
                }
                continue;
            }
            
            if(sectionSize <= 1) {
                // 書式が1つしかない場合
                conditionFormatter.setOperator(ConditionOperator.ALL);
                
            } else if(sectionSize == 2) {
                if(i==0) {
                    // ゼロ以上の数の書式
                    conditionFormatter.setOperator(ConditionOperator.NON_NEGATIVE);
                    
                } else if(i==1) {
                    // その他の書式
                    if(hasConditionFirst) {
                        conditionFormatter.setOperator(ConditionOperator.ALL);
                    } else {
                        conditionFormatter.setOperator(ConditionOperator.NEGATIVE);
                    }
                }
                
            } else if(sectionSize == 3) {
                if(i==0) {
                    // 正の書式
                    conditionFormatter.setOperator(ConditionOperator.POSITIVE);
                    
                } else if(i==1) {
                    // 負の数の書式
                    conditionFormatter.setOperator(ConditionOperator.NEGATIVE);
                    
                } else {
                    // その他の書式
                    conditionFormatter.setOperator(ConditionOperator.ALL);
                    
                }
                
            } else if(sectionSize == 4) {
                if(i==0) {
                    // 正の書式
                    conditionFormatter.setOperator(ConditionOperator.POSITIVE);
                    
                } else if(i==1) {
                    // 負の数の書式
                    conditionFormatter.setOperator(ConditionOperator.NEGATIVE);
                    
                } else if(i==2) {
                    // ゼロの書式
                    conditionFormatter.setOperator(ConditionOperator.ZERO);
                    
                } else {
                    // その他の書式
                    conditionFormatter.setOperator(ConditionOperator.ALL);
                    
                }
                
            } else {
                throw new CustomFormatterParseException(pattern,
                        String.format("section size over 4. but '%s' number of %d secitions.", pattern, sections.size()));
            }
            
        }
        
        return formatter;
    }
1362340
function Logger(name) {
    var prjName = module.exports.PROJECT_NAME;
    this.name = prjName ? prjName + ':' + name : name;
    this._debug = debug(this.name);
    this._debug.log = logDebug;
    this.debugEnabled = debug.enabled(this.name);
    if (this.debugEnabled) {
        logDebug('[%s] debug is %s', this.name.blue, 'ENABLED'.green);
    }
}
301585
public static Logger getLogger(String name, String suffix) {
        return getLogger(name == null || name.length() == 0 ? suffix : name + "." + suffix);
    }