Package org.apache.avalon.framework.logger

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


                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

            DefaultContext appContext = new DefaultContext();
            appContext.put(
                Constants.CONTEXT_CLASS_LOADER,
                CocoonBean.class.getClassLoader());
            cliContext = new CommandLineContext(contextDir);
            cliContext.enableLogging(new LogKitLogger(log));
            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, cliContext);
            DefaultLogKitManager logKitManager = null;
            if (logKit != null) {
                final FileInputStream fis = new FileInputStream(logKit);
                final DefaultConfigurationBuilder builder =
                    new DefaultConfigurationBuilder();
                final Configuration logKitConf = builder.build(fis);
                logKitManager =
                    new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
                logKitManager.setLogger(log);
                final DefaultContext subcontext =
                    new DefaultContext(appContext);
                subcontext.put("context-root", contextDir);
                logKitManager.contextualize(subcontext);
                logKitManager.configure(logKitConf);
                if (logger != null) {
                    log = logKitManager.getLogger(logger);
                } else {
                    log = logKitManager.getLogger("cocoon");
                }
            } else {
                logKitManager =
                    new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
                logKitManager.setLogger(log);
            }
            appContext.put(
                Constants.CONTEXT_CLASSPATH,
                getClassPath(contextDir));
            appContext.put(Constants.CONTEXT_WORK_DIR, work);
            appContext.put(
                Constants.CONTEXT_UPLOAD_DIR,
                contextDir + "upload-dir");
            File cacheDir =
                getDir(workDir + File.separator + "cache-dir", "cache");
            appContext.put(Constants.CONTEXT_CACHE_DIR, cacheDir);
            appContext.put(Constants.CONTEXT_CONFIG_URL, conf.toURL());

            loadClasses(classList);

            cocoon = new Cocoon();
            ContainerUtil.enableLogging(cocoon, new LogKitLogger(log));
            ContainerUtil.contextualize(cocoon, appContext);
            cocoon.setLogKitManager(logKitManager);
            ContainerUtil.initialize(cocoon);

            this.sourceResolver =
View Full Code Here

     */
    private void processXSP(String uri) throws Exception {
        String markupLanguage = "xsp";
        String programmingLanguage = "java";
        Environment env = new LinkSamplingEnvironment("/", context, attributes, null, cliContext,
                                                      new LogKitLogger(log));
        cocoon.precompile(uri, env, markupLanguage, programmingLanguage);
    }
View Full Code Here

     */
    private void processXMAP(String uri) throws Exception {
        String markupLanguage = "sitemap";
        String programmingLanguage = "java";
        Environment env = new LinkSamplingEnvironment("/", context, attributes, null, cliContext,
                                                      new LogKitLogger(log));
        cocoon.precompile(uri, env, markupLanguage, programmingLanguage);
    }
View Full Code Here

                deparameterizedURI,
                context,
                attributes,
                parameters,
                cliContext,
                new LogKitLogger(log));
        processLenient(env);
        return env.getLinks();
    }
View Full Code Here

                parameters,
                links,
                gatheredLinks,
                cliContext,
                stream,
                new LogKitLogger(log));

        // Here Cocoon can throw an exception if there are errors in processing the page
        cocoon.process(env);

        // if we get here, the page was created :-)
View Full Code Here

                parameters,
                empty,
                null,
                cliContext,
                new NullOutputStream(),
                new LogKitLogger(log));
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

            cfgPassword.setValue(getPassword());
            config.addChild(cfgPassword);
        }

        // log is required to ensure errors are available
        source.enableLogging(new LogKitLogger(log));
        try {
            source.configure(config);
            source.setInstrumentableName(getDataSource());
        } catch (ConfigurationException e) {
            log.error("Could not configure datasource for pool: "+getDataSource(),e);
View Full Code Here

        logger.setLogTargets
            ( new LogTarget[]
            {new StreamTarget( System.out, new PatternFormatter( pattern ) )} );
        logger.setPriority( Priority.INFO );

        m_manager.enableLogging( new LogKitLogger( logger ) );
        m_manager.contextualize( new DefaultContext() );
        m_manager.configure( new DefaultConfiguration( "", "" ) );

        m_logger = new LogKitLogger( logger );
    }
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.