Examples of CommonsLogger


Examples of org.apache.avalon.framework.logger.CommonsLogger

            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            final PrintStream stream = new PrintStream(buffer, true);
            System.setProperty(Log.class.getName(), SimpleLog.class.getName());
            LogFactory.releaseAll();
            System.setErr(stream);
            final Logger logger = new CommonsLogger(LogFactory.getLog("JUnit"), "JUnit");
            final Logger child = logger.getChildLogger("test");
            child.fatalError("foo");
            assertEquals("[FATAL] JUnit.test - foo", buffer.toString().trim());
        }
        finally
        {
View Full Code Here

Examples of org.apache.avalon.framework.logger.CommonsLogger

     * Create the Avalon logger to be passed to YAAFI
     * @return an Avalon Logger
     */
    protected Logger createAvalonLogger()
    {
        Logger result = new CommonsLogger(log, AVALON_LOG_CATEGORY);
        return result;
    }
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.