Package org.apache.commons.logging

Examples of org.apache.commons.logging.Log


        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        Log log = (Log) newMock(Log.class);

        MockControl mc = newControl(Module.class);
        Module module = (Module) mc.getMock();

        MockControl errorLogc = newControl(ErrorLog.class);
View Full Code Here


      }
     
      // Print out usage if we get to here.
      printUsageAndExit();
    }
    Log LOG = LogFactory.getLog("ThriftServer");
    LOG.info("starting HBase Thrift server on port " +
      Integer.toString(port));
    HBaseHandler handler = new HBaseHandler();
    Hbase.Processor processor = new Hbase.Processor(handler);
    TServerTransport serverTransport = new TServerSocket(port);
    TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true);
View Full Code Here

public class ProxyLoggingInterceptorFactory implements ServiceInterceptorFactory
{

    public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters)
    {
        Log log = stack.getServiceLog();

        InvocationHandler handler = new ProxyLoggingInvocationHandler(log, stack.peek());

        Object interceptor =
            Proxy.newProxyInstance(
View Full Code Here

        t.setTitle("Failure");

        List tasks = Collections.singletonList(t);

        MockControl logControl = newControl(Log.class);
        Log log = (Log) logControl.getMock();

        MockControl errorLogControl = newControl(ErrorLog.class);
        ErrorLog errorLog = (ErrorLog) errorLogControl.getMock();

        log.info("Executing task Failure.");

        errorLog.error(
                "Exception while executing task Failure: Failure!",
                null,
                new ApplicationRuntimeException(""));
        errorLogControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
        { null, null, new TypeMatcher() }));

        log.info("Executed one task with one failure \\(in \\d+ milliseconds\\)\\.");
        logControl.setMatcher(new AggregateArgumentsMatcher(new RegexpMatcher()));

        replayControls();

        TaskExecutor e = new TaskExecutor();
View Full Code Here

        List tasks = new ArrayList();
        tasks.add(t1);
        tasks.add(t2);

        MockControl logControl = newControl(Log.class);
        Log log = (Log) logControl.getMock();

        TaskExecutor e = new TaskExecutor();

        ErrorLog errorLog = (ErrorLog) newMock(ErrorLog.class);

        e.setErrorLog(errorLog);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);

        // Note the ordering; explicitly set, to check that ordering does
        // take place.
        log.info("Executing task Fixture #2.");
        log.info("Executing task Fixture #1.");
        log.info("Executed 2 tasks \\(in \\d+ milliseconds\\)\\.");
        logControl.setMatcher(new RegexpMatcher());

        replayControls();

        e.run();
View Full Code Here

     */
    private void httpProxy(
        final SimpleHttpServerConnection conn,
        final SimpleRequest request) throws IOException
    {
        Log wireLog = LogFactory.getLog("httpclient.wire");
       
        URI url = new HttpURL(request.getRequestLine().getUri());

        HttpClient client = new HttpClient();
        HostConfiguration hc = new HostConfiguration();
View Full Code Here

                instances = new HashMap();
                instancesByClassLoader.put(contextClassLoader, instances);
            }

            // get the log
            Log log = (Log) instances.get(name);
            if (log == null) {
                log = new GeronimoLog(name, logFactory.getInstance(name));
                instances.put(name, log);
            }
            return log;
View Full Code Here

    }

    public void testLookup() throws Exception
    {
        ConsoleAppender app = new ConsoleAppender(new SimpleLayout());
        Log log = LogFactory.getLog("TestLogger");
        Logger logger = ((Log4JLogger)log).getLogger();
        logger.addAppender(app);
        logger.setLevel(Level.DEBUG);
        logger.setAdditivity(false);
        ExprLookup.Variables vars = new ExprLookup.Variables();
View Full Code Here

    public void testSchemaNotVisible()
    {
        MockControl ehControl = newControl(ErrorHandler.class);
        ErrorHandler errorHandler = (ErrorHandler) ehControl.getMock();

        Log log = LogFactory.getLog(XmlExtensionResolver.class);

        SchemaImpl schema = new SchemaImpl("foo.bar");
        schema.setId("Baz");
        schema.setVisibility(Visibility.PRIVATE);
View Full Code Here

    public void testSchemaNotFound()
    {
        ErrorHandler errorHandler = new DefaultErrorHandler();

        Log log = LogFactory.getLog(XmlModuleDescriptorProcessor.class);

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();
View Full Code Here

TOP

Related Classes of org.apache.commons.logging.Log

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.