Package org.apache.avalon.framework.logger

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


        m_pool = new BasicThreadPool( this, name, m_underlyingPool );
    }

    public void setLogger( final org.apache.log.Logger logger )
    {
        enableLogging( new LogKitLogger( logger ) );
    }
View Full Code Here


        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        final Configuration conf = builder.build( testconf );
        final Context context = setupContext( conf.getChild( "context" ) );

        final DefaultLogKitManager lkm = new DefaultLogKitManager();
        lkm.enableLogging( new LogKitLogger( m_logger ) );
        lkm.contextualize( context );
        lkm.configure( conf );
        m_lkm = lkm;
    }
View Full Code Here

        m_hierarchy = hierarchy;
    }

    public void setLogger( final Logger logger )
    {
        enableLogging( new LogKitLogger( logger ) );
    }
View Full Code Here

         * @exception  ConfigurationException  thrown iff contextualizing of Cocoon instance fails
         * @exception  Exception               thrown iff initializing of Cocoon instance fails
         */
        public Cocoon createCocoon() throws Exception, ContextException, ConfigurationException {
            Cocoon cocoon = new Cocoon();
            cocoon.enableLogging(new LogKitLogger(logger));
            cocoon.contextualize(this.ctx);
            cocoon.setLogKitManager(logKitManager);
            cocoon.initialize();
            return cocoon;
        }
View Full Code Here

         * @exception  Exception  thrown iff contextualizing, configuring, or creating
         *   of CocoonProcessorDelegate instance fails.
         */
        public CocoonProcessorDelegate createCocoonProcessorDelegate(Cocoon cocoon, Configuration configuration) throws Exception {
            CocoonProcessorDelegate cpd = new CocoonProcessorDelegate(cocoon);
            cpd.enableLogging(new LogKitLogger(logger));
            cpd.contextualize(this.ctx);
            cpd.configure(configuration);
            cpd.initialize();
            return cpd;
        }
View Full Code Here

                    // No logger attribute available, using standard logger
                    usedLogger = logger;
                }
                else
                {
                    usedLogger = new LogKitLogger(logkit.getLogger( loggerName ));
                }
            }

            ((LogEnabled)component).enableLogging( usedLogger );
        }
View Full Code Here

                                  res,
                                  this.servletContext,
                                  (HttpContext) this.appContext.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT),
                                  this.containerEncoding,
                                  formEncoding);
        env.enableLogging(new LogKitLogger(this.log));
        return env;
    }
View Full Code Here

                Class pcm = ClassUtils.loadClass(parentComponentManagerClass);
                Constructor pcmc = pcm.getConstructor(new Class[]{String.class});
                parentComponentManager = (ComponentManager) pcmc.newInstance(new Object[]{initParam});

                if (parentComponentManager instanceof LogEnabled) {
                    ((LogEnabled) parentComponentManager).enableLogging(new LogKitLogger(log));
                }
                if (parentComponentManager instanceof Contextualizable) {
                    ((Contextualizable) parentComponentManager).contextualize(this.appContext);
                }
                if (parentComponentManager instanceof Initializable) {
View Full Code Here

                log.info("Reloading from: " + configFile.toExternalForm());
            }
            Cocoon c = (Cocoon) ClassUtils.newInstance("org.apache.cocoon.Cocoon");
            final String rootlogger = getInitParameter("cocoon-logger");
            if (rootlogger != null) {
                c.enableLogging(new LogKitLogger(this.logKitManager.getLogger(rootlogger)));
            } else {
                c.enableLogging(new LogKitLogger(log));
            }
            c.contextualize(this.appContext);
            c.compose(getParentComponentManager());
            c.setLogKitManager(this.logKitManager);
            if (this.enableInstrumentation) {
View Full Code Here

        Logger imLogger =
            this.logKitManager.getLogger(conf.getAttribute( "logger", "core.instrument" ));

        // Set up the Instrument Manager
        DefaultInstrumentManager instrumentManager = new DefaultInstrumentManager();
        instrumentManager.enableLogging(new LogKitLogger(imLogger));
        instrumentManager.configure(conf);
        instrumentManager.initialize();

        if (log.isDebugEnabled()) {
            log.debug("Instrument manager created " + instrumentManager);
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.logger.LogKitLogger

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.