Adds a container item for the given logger.<p>

@param logger the logger for which to generate a container item
540644
public void addItemForLogger(Logger logger) {

        Item item = m_container.addItem(logger);
        if (item != null) {
            item.getItemProperty(TableColumn.Channel).setValue(logger.getName());
            Logger parent = logger.getParent();
            item.getItemProperty(TableColumn.ParentChannel).setValue(parent != null ? parent.getName() : "none");
            item.getItemProperty(TableColumn.File).setValue(getLogFiles(logger));
            item.getItemProperty(TableColumn.Level).setValue(LoggerLevel.fromLogger(logger));
        }
    }
538859
public function setLogger(LoggerInterface $logger)
	{
		$this->logger = $logger;

		// Also update the logger of the sender
		if ($this->sender instanceOf LoggerAwareInterface) {
			$this->sender->setLogger($logger);
		}
	}
980071
protected void addUserToContainer(IndexedContainer container, CmsUser user) {

        if (m_blackList.contains(user)) {
            return;
        }
        Item item = container.addItem(user);
        fillItem(item, user);
    }
482872
def logger_add (self, loggerclass):
        """"""
        self.loggers[loggerclass.LoggerName] = loggerclass
        self[loggerclass.LoggerName] = {}
1059317
private void addChildrenForOUNode(CmsOrganizationalUnit item) {

        List<Object> itemsToRemove = new ArrayList<Object>();

        Collection<?> childCol = m_treeContainer.getChildren(item);
        if (childCol != null) {
            itemsToRemove.addAll(childCol);
        }

        try {
            if (m_app.isOUManagable(item.getName())) {

                List<I_CmsOuTreeType> types = m_app.getTreeTypeProvider().getTreeTypes();
                for (I_CmsOuTreeType type : types) {
                    if (!type.isValidForOu(m_cms, item.getName())) {
                        continue;
                    }
                    if (type.isOrgUnit()) {
                        continue;
                    }
                    String itemId = type.getId() + item.getName();
                    Item newItem = m_treeContainer.addItem(itemId);
                    itemsToRemove.remove(itemId);
                    if (newItem != null) {
                        newItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(itemId, type));
                        newItem.getItemProperty(PROP_TYPE).setValue(type);
                        m_treeContainer.setParent(itemId, item);
                        setChildrenAllowed(itemId, type.isExpandable());
                    }
                }
            }
            List<CmsOrganizationalUnit> ous = OpenCms.getOrgUnitManager().getOrganizationalUnits(
                m_cms,
                item.getName(),
                false);
            List<CmsOrganizationalUnit> webOus = new ArrayList<CmsOrganizationalUnit>();
            for (CmsOrganizationalUnit ou : ous) {
                if (m_app.isParentOfManagableOU(ou.getName())) {
                    itemsToRemove.remove(ou);
                    if (ou.hasFlagWebuser()) {
                        webOus.add(ou);
                    } else {
                        addOuToTree(ou, item);
                    }
                }
            }
            for (CmsOrganizationalUnit ou : webOus) {
                if (m_app.isParentOfManagableOU(ou.getName())) {
                    itemsToRemove.remove(ou);
                    addOuToTree(ou, item);
                }
            }
        } catch (CmsException e) {
            LOG.error("Can't read ou", e);
        }
        for (Object it : itemsToRemove) {
            m_treeContainer.removeItemRecursively(it);
        }
    }
1128251
public void setLogger(Logger logger) {
		this.logger = logger == null ? LoggerFactory.getLogger(getClass()) : logger;
	}
189430
public BlockingListMaker<K, E> log(Logger logger) {
        this.logger = logger == null ? NULL_LOGGER : logger;
        return this;
    }
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)
302691
public void addChild(CmsGalleryTreeEntry child) {

        if (m_children == null) {
            m_children = new ArrayList<CmsGalleryTreeEntry>();
        }
        m_children.add(child);
        child.setParent(this);
    }
723314
private void addArgument(CliArgumentContainer argumentContainer) {

    this.arguments.add(argumentContainer);
    String modeId = argumentContainer.getArgument().mode();
    requireMode(modeId, argumentContainer);
  }
44339
public void setLogger(Logger logger) {
        this.logger = logger;
        if (compiler instanceof AbstractCompiler) {
            ((AbstractCompiler) compiler).setLogger(logger);
        }
    }
517572
public void add(final ClassLoader classLoader) {
        if (classLoader == null) {
            return;
        }
        if (added.add(classLoader)) {
            final ClassLoaderHandlerRegistryEntry entry = getRegistryEntry(classLoader);
            if (entry != null) {
                classLoaderOrder.add(new SimpleEntry<>(classLoader, entry));
            }
        }
    }
1198122
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE")
    private void installLogger() {
        Jenkins.logRecords = handler.getView();
        Logger.getLogger("").addHandler(handler);
    }
246074
@SuppressWarnings("deprecation")
    private void fillTable() {

        removeAllItems();
        List<Logger> loggerList = CmsLog4jUtil.getAllLoggers();
        for (Logger logger : loggerList) {
            addItemForLogger(logger);
        }
    }
660357
protected Logger buildLogger(String fileStr) throws IOException {
		String loggerName = buildLoggerName();
		Appender appender = buildAppender(loggerName, fileStr);

		// Create the logger and add to the map of loggers using our factory
		Logger logger = loggerContext.getLogger(loggerName);
		logger.addAppender(appender);
		logger.setLevel(Level.INFO);
		logger.setAdditive(false);
		return logger;
	}
1342300
public function add(LoggerInterface $logger, $name)
    {
        if (isset($this->loggers[$name])) {
            return;
        }

        $this->loggers[$name] = $logger;
    }
300237
function Logger(logger, options) {
    options = options || {};

    /**
     * ### Logger.logger
     *
     * The Winston logger
     *
     * @see Winston
     */
    this.logger = winston.loggers.get(logger);

    /**
     * ### Logger.name
     *
     * The name of the logger (might be the name of the channel).
     *
     * @see ServerChannel
     */
    this.name = options.name;

    // Set the appropriate log function.
    if (logger === 'messages') this.log = this.logMsg;
    else this.log = this.logText;
}