[logback-dev] [Bug 35] provide JMX bean similar to java.util.logging.LoggingMXBean / java.util.logging.Logging

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Jan 4 08:36:15 CET 2007


http://bugzilla.qos.ch/show_bug.cgi?id=35





------- Comment #1 from sdavids at gmx.de  2007-01-04 08:36 -------
/*******************************************************************************
 * Copyright (c) 2007 Sebastian Davids.
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, and is available at
 * http://www.gnu.org/licenses/lgpl.html
 *
 * Contributors:
 *     Sebastian Davids - initial API and implementation

*******************************************************************************/
package ch.qos.logback.classic;

/**
 * The management interface for the logging facility.
 * <p>
 * The {@link javax.management.ObjectName ObjectName} for uniquely identifying
the <code>LoggingMBean</code> within an
 * MBeanServer is: <code>ch.qos.logback.classic:type=Logging</code>
 * </p>
 * 
 * @see java.lang.management.ManagementFactory
 * @author Sebastian Davids, <a
href="mailto:sebastian at davids.name">sebastian at davids.name</a>
 */
public interface LoggingMBean {

    /**
     * Returns the list of currently registered loggers.
     * 
     * @return a list of <code>String</code> each of which is a currently
registered <code>Logger</code> name
     */
    public String[] getLoggerNames();

    /**
     * Gets the name of the log level associated with the specified logger.
     * <p>
     * If the specified logger does not exist, <code>null</code> is returned.
     * </p>
     * 
     * @param loggerName
     *            the name of the <code>Logger</code> to be retrieved
     * @return the name of the log level of the specified logger or
<code>null</code> if the specified logger does not
     *         exist
     * @see Logger#getLevel
     */
    String getLoggerLevel(String loggerName);

    /**
     * Sets the specified logger to the specified new level.
     * <p>
     * The level of the specified logger is set to the parsed
<code>Level</code> matching the <code>levelName</code>.
     * </p>
     * <p>
     * If <code>null</code> the logger's level is set to a default.
     * </p>
     * 
     * @param loggerName
     *            the name of the <code>Logger</code> to be set; may not be
<code>null</code>
     * @param levelName
     *            the name of the level to set the specified logger to or
<code>null</code> if to set the level to a
     *            default
     * @throws IllegalArgumentException
     *             if the specified logger does not exist
     * @see Logger#setLevel
     * @see Level#toLevel(String)
     */
    void setLoggerLevel(String loggerName, String levelName);
}


-- 
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the logback-dev mailing list