Package org.apache.commons.logging.impl

Examples of org.apache.commons.logging.impl.SimpleLog


    /**
     * Construct a new TestConverter
     */
    public TestConverter() {
        logger = new SimpleLog("FOP/Test");
        logger.setLevel(SimpleLog.LOG_LEVEL_ERROR);
    }
View Full Code Here


     * SimpleLog if no logger has been explicitly set.
     * @return Logger the logger for the transcoder.
     */
    protected final Log getLogger() {
        if (this.logger == null) {
            this.logger = new SimpleLog("FOP/Transcoder");
            ((SimpleLog) logger).setLevel(SimpleLog.LOG_LEVEL_INFO);
        }
        return this.logger;
    }
View Full Code Here

public class SimpleLogTestCase extends AbstractLogTest
{
    public Log getLogObject()
    {
        return new SimpleLog(this.getClass().getName());
    }
View Full Code Here

        PrintStream errStream = System.err;
        ByteArrayOutputStream warning = new ByteArrayOutputStream();
        System.setErr(new PrintStream(warning));
       
        // force logging to go to System.err
        writer.setLog( new SimpleLog( "test.betwixt" ) );
       
       
        writer.setEndOfLine("X");
        warning.flush();
        assertTrue(warning.toString().startsWith("[WARN]"));
View Full Code Here

    // See https://issues.apache.org/jira/browse/JAMES-998
    public void testNoConfiguredDomains() throws Exception {
        List<String> domains = new ArrayList<String>();
        XMLDomainList dom = new XMLDomainList();
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(setUpConfiguration(false, false, domains));
        dom.setDNSService(setUpDNSServer("localhost"));

        assertNull("No domain found", dom.getDomains());
    }
View Full Code Here

        List<String> domains = new ArrayList<String>();
        domains.add("domain1.");
        domains.add("domain2.");
   
        XMLDomainList dom = new XMLDomainList();
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(setUpConfiguration(false,false,domains));
        dom.setDNSService(setUpDNSServer("localhost"));
       
        assertTrue("Two domain found",dom.getDomains().length ==2);
    }
View Full Code Here

    public void testGetDomainsAutoDetectNotLocalHost() throws Exception {
        List<String> domains = new ArrayList<String>();
        domains.add("domain1.");
   
        XMLDomainList dom = new XMLDomainList();
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(setUpConfiguration(true,false,domains));

        dom.setDNSService(setUpDNSServer("local"));
        assertEquals("Two domains found",dom.getDomains().length, 2);
    }
View Full Code Here

    public void testGetDomainsAutoDetectLocalHost() throws Exception {
        List<String> domains = new ArrayList<String>();
        domains.add("domain1.");
   
        XMLDomainList dom = new XMLDomainList();
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(setUpConfiguration(true,false,domains));

        dom.setDNSService(setUpDNSServer("localhost"));
       
        assertEquals("One domain found",dom.getDomains().length, 1);
View Full Code Here

        m_pop3Server.setDNSService(dnsservice);
        m_pop3Server.setFileSystem(fSystem);
        m_pop3Server.setProtocolHandlerChain(chain);
      
       
        SimpleLog log = new SimpleLog("Mock");
        log.setLevel(SimpleLog.LOG_LEVEL_DEBUG);
        m_pop3Server.setLog(log);
        m_pop3Server.setMailServer(m_mailServer);       
    }
View Full Code Here

    protected void setUp() throws Exception {
        setUpServiceManager();
       
        chain = new JamesProtocolHandlerChain();
        chain.setInstanceFactory(serviceManager);
        chain.setLog(new SimpleLog("ChainLog"));
  
        setUpPOP3Server();
        m_testConfiguration = new POP3TestConfiguration(m_pop3ListenerPort);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.logging.impl.SimpleLog

Copyright © 2018 www.massapicom. 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.