Examples of LoggerConfig


Examples of com.caucho.log.LoggerConfig

   
    try {
      if (! Alarm.isTest())
        thread.setContextClassLoader(ClassLoader.getSystemClassLoader());
     
      LoggerConfig log = new LoggerConfig();
      program.configure(log);
    } finally {
      thread.setContextClassLoader(loader);
    }
  }
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

            InstanceAlreadyExistsException, MBeanRegistrationException,
            NotCompliantMBeanException {

        Map<String, LoggerConfig> map = ctx.getConfiguration().getLoggers();
        for (String name : map.keySet()) {
            LoggerConfig cfg = map.get(name);
            LoggerConfigAdmin mbean = new LoggerConfigAdmin(ctx.getName(), cfg);
            mbs.registerMBean(mbean, mbean.getObjectName());
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

    private static void registerLoggerConfigs(final LoggerContext ctx, final MBeanServer mbs, final Executor executor)
            throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException {

        final Map<String, LoggerConfig> map = ctx.getConfiguration().getLoggers();
        for (final String name : map.keySet()) {
            final LoggerConfig cfg = map.get(name);
            final LoggerConfigAdmin mbean = new LoggerConfigAdmin(ctx, cfg);
            register(mbs, mbean, mbean.getObjectName());

            if (cfg instanceof AsyncLoggerConfig) {
                final AsyncLoggerConfig async = (AsyncLoggerConfig) cfg;
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

    /**
     * Returns the parent of this Logger. If it doesn't already exist return a temporary Logger.
     * @return The parent Logger.
     */
    public Logger getParent() {
        final LoggerConfig lc = config.loggerConfig.getParent();
        if (lc == null) {
            return null;
        }
        if (context.hasLogger(lc.getName())) {
            return context.getLogger(getName(), getMessageFactory());
        }
        return new Logger(context, getName(), this.getMessageFactory());
    }
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

            InstanceAlreadyExistsException, MBeanRegistrationException,
            NotCompliantMBeanException {

        Map<String, LoggerConfig> map = ctx.getConfiguration().getLoggers();
        for (String name : map.keySet()) {
            LoggerConfig cfg = map.get(name);
            LoggerConfigAdmin mbean = new LoggerConfigAdmin(ctx.getName(), cfg);
            mbs.registerMBean(mbean, mbean.getObjectName());
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

     * @return A Loggers object.
     */
    @PluginFactory
    public static Loggers createLoggers(@PluginElement("loggers") final LoggerConfig[] loggers) {
        final ConcurrentMap<String, LoggerConfig> loggerMap = new ConcurrentHashMap<String, LoggerConfig>();
        LoggerConfig root = null;

        for (final LoggerConfig logger : loggers) {
            if (logger != null) {
                if (logger.getName().length() == 0) {
                    root = logger;
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

     * This method is only used for 1.x compatibility.
     * Returns the parent of this Logger. If it doesn't already exist return a temporary Logger.
     * @return The parent Logger.
     */
    public Logger getParent() {
        final LoggerConfig lc = config.loggerConfig.getName().equals(getName()) ? config.loggerConfig.getParent() :
            config.loggerConfig;
        if (lc == null) {
            return null;
        }
        if (context.hasLogger(lc.getName())) {
            return context.getLogger(lc.getName(), getMessageFactory());
        }
        return new Logger(context, lc.getName(), this.getMessageFactory());
    }
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

    private static void registerLoggerConfigs(final LoggerContext ctx, final MBeanServer mbs, final Executor executor)
            throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException {

        final Map<String, LoggerConfig> map = ctx.getConfiguration().getLoggers();
        for (final String name : map.keySet()) {
            final LoggerConfig cfg = map.get(name);
            final LoggerConfigAdmin mbean = new LoggerConfigAdmin(ctx, cfg);
            register(mbs, mbean, mbean.getObjectName());

            if (cfg instanceof AsyncLoggerConfig) {
                AsyncLoggerConfig async = (AsyncLoggerConfig) cfg;
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

     * @return A Loggers object.
     */
    @PluginFactory
    public static Loggers createLoggers(@PluginElement("Loggers") final LoggerConfig[] loggers) {
        final ConcurrentMap<String, LoggerConfig> loggerMap = new ConcurrentHashMap<String, LoggerConfig>();
        LoggerConfig root = null;

        for (final LoggerConfig logger : loggers) {
            if (logger != null) {
                if (logger.getName().isEmpty()) {
                    root = logger;
View Full Code Here

Examples of org.apache.logging.log4j.core.config.LoggerConfig

        private static final String DEFAULT_LEVEL = "org.apache.logging.log4j.level";

        public BasicConfiguration() {

            final LoggerConfig root = getRootLogger();
            final String l = System.getProperty(DEFAULT_LEVEL);
            final Level level = (l != null && Level.valueOf(l) != null) ? Level.valueOf(l) : Level.ERROR;
            root.setLevel(level);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.