Add a new logger type to the known loggers.
482872
def logger_add (self, loggerclass):
        """"""
        self.loggers[loggerclass.LoggerName] = loggerclass
        self[loggerclass.LoggerName] = {}
1094
def add(self, levels, logger):
        
        if isinstance(levels, (list, tuple)):
            for lvl in levels:
                self.config[lvl].add(logger)
        else:
            self.config[levels].add(logger)
98612
public static Logger createLogger(final LoggerType type,
			final String consumerName)
		throws LoggingException
	{

		Logger log = new Logger(type, consumerName);
		if (consumerLoggingIndex.put(consumerName, log) != null) {
			throw ErrorFactory
					.createLoggingException(ErrorKeys.LOGGING_LOGGINGFACTORY_LOGGER_ALREADY_EXIST);
		}

		return log;
	}
44339
public void setLogger(Logger logger) {
        this.logger = logger;
        if (compiler instanceof AbstractCompiler) {
            ((AbstractCompiler) compiler).setLogger(logger);
        }
    }
663484
def setup_logger():  # type: () -> logging.Logger
    
    formatter = logging.Formatter(
        fmt='%(levelname)s - %(module)s - %(message)s')

    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG)
    logger.addHandler(handler)
    return logger
977998
def patch_logging(self):
        """"""
        if not hasattr(logging, "getLogger"):
            def getLogger(name=None):
                other = Logger(self)
                if name is not None:
                    other.name = name
                return other
            logging.getLogger = getLogger
1054438
protected function setLoggers()
    {
        if ($loggers = $this->hasLoggerConfig()) {
            foreach ($loggers as $channel => $logger) {
                $loggerChannel = $this->getChannelName($logger, $channel);
                $loggerName = $this->getLoggerIdentified($logger, $loggerChannel);
                
                $this->container[$loggerName] = Logger::get(
                    $loggerChannel, 
                    $this->buildHandlers($logger['handlers']??[])
                );
            }
        }
    }
733222
def addLogger(self, logger, level=logging.INFO):
        
        if isinstance(logger, logging.Logger):
            logger = logger.name
        
        if logger in self._loggers:
            return
        
        # allow the handler to determine the level for this logger
        if logger == 'root':
            _log = logging.getLogger()
        else:
            _log = logging.getLogger(logger)
        
        _log.addHandler(self.handler())
        
        self._loggers.add(logger)
        self.handler().setLoggerLevel(logger, level)
1342300
public function add(LoggerInterface $logger, $name)
    {
        if (isset($this->loggers[$name])) {
            return;
        }

        $this->loggers[$name] = $logger;
    }
870619
def Add(self, other):
    """"""
    new_descriptors = []
    for desc in self.descriptors + other.descriptors:
      if desc not in new_descriptors:
        new_descriptors.append(desc)

    return TypeDescriptorSet(*new_descriptors)
726601
public LogSetup withTypes(LogType... types) {
        java.util.ArrayList<String> typesCopy = new java.util.ArrayList<String>(types.length);
        for (LogType value : types) {
            typesCopy.add(value.toString());
        }
        if (getTypes() == null) {
            setTypes(typesCopy);
        } else {
            getTypes().addAll(typesCopy);
        }
        return this;
    }
602551
@SuppressWarnings("unchecked")
    public <E> MessageHandler<? super E> addSentMessageHandler(Class<E> type,
            MessageHandler<? super E> handler) {
        sentMessageHandlerCache.clear();
        return (MessageHandler<? super E>) sentMessageHandlers.put(type, handler);
    }
464461
def _logger_stream(self):
        """"""
        sh = logging.StreamHandler()
        sh.set_name('sh')
        sh.setLevel(logging.INFO)
        sh.setFormatter(self._logger_formatter)
        self.log.addHandler(sh)
1260010
def setup_logger(logger=None, level='INFO'):
    
    if not logger:  # if no logger exists, make one
        logger = logging.getLogger()

    if not logger.handlers:  # setup logger handlers
        channel = logging.StreamHandler()
        channel.setFormatter(log.DebugLogFormatter())

        # channel.setFormatter(log.LogFormatter())
        logger.setLevel(level)
        logger.addHandler(channel)
1217451
protected function addLogHandlers()
    {
        if ($logger = Injector::inst()->get(LoggerInterface::class)) {
            if (Director::is_cli()) {
                $logger->pushHandler(new StreamHandler('php://stdout'));
                $logger->pushHandler(new StreamHandler('php://stderr', Logger::WARNING));
            } else {
                $logger->pushHandler(new PreformattedEchoHandler());
            }
        }
    }
466986
function addType(typeName, type) {
	if (types[typeName]) {
		throw new Error("Type already registered '" + typeName + "'");
	}
	types[typeName] = type;
}
276351
def add_handler(self, message_type, handler):
        """"""
        if message_type not in self._handlers:
            self._handlers[message_type] = []

        if handler not in self._handlers[message_type]:
            self._handlers[message_type].append(handler)