Examples of LogKitLogger


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

     * Return the default Logger.  This is basically the same
     * as getting the Logger for the "" category.
     */
    public Logger getDefaultLogger()
    {
        return new LogKitLogger( m_hierarchy.getRootLogger() );
    }
View Full Code Here

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

            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

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

        final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();
        final ErrorHandler errorHandler = new DefaultErrorHandler();
        defaultHierarchy.setErrorHandler(errorHandler);
        defaultHierarchy.setDefaultLogTarget(servTarget);
        defaultHierarchy.setDefaultPriority(logPriority);
        final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));
        final String loggerManagerClass =
            this.getInitParameter("logger-class", LogKitLoggerManager.class.getName());

        // the log4j support requires currently that the log4j system is already configured elsewhere

        final LoggerManager loggerManager =
                newLoggerManager(loggerManagerClass, defaultHierarchy);
        ContainerUtil.enableLogging(loggerManager, logger);

        final DefaultContext subcontext = new DefaultContext(this.appContext);
        subcontext.put("servlet-context", this.servletContext);
        subcontext.put("context-work", this.workDir);
        if (this.servletContextPath == null) {
            File logSCDir = new File(this.workDir, "log");
            logSCDir.mkdirs();
            if (logger.isWarnEnabled()) {
                logger.warn("Setting context-root for LogKit to " + logSCDir);
            }
            subcontext.put("context-root", logSCDir.toString());
        } else {
            subcontext.put("context-root", this.servletContextPath);
        }
View Full Code Here

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

    protected void initLogger() {
        final String accesslogger = getInitParameter("portlet-logger", "cocoon");

        final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();

        final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));

        final LogKitLoggerManager logKitLoggerManager = new LogKitLoggerManager(defaultHierarchy);
        logKitLoggerManager.enableLogging(logger);

        final DefaultContext subcontext = new DefaultContext();
View Full Code Here

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

        final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();
        final ErrorHandler errorHandler = new DefaultErrorHandler();
        defaultHierarchy.setErrorHandler(errorHandler);
        defaultHierarchy.setDefaultLogTarget(servTarget);
        defaultHierarchy.setDefaultPriority(logPriority);
        final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));
        final String loggerManagerClass =
            this.getInitParameter("logger-class", LogKitLoggerManager.class.getName());

        // the log4j support requires currently that the log4j system is already configured elsewhere
View Full Code Here

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

      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

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

                this.beanWriter.setCallDocumentEvents(false);

                synchronized (BetwixtTransformer.class) {
                    if (introspector == null) {
                        introspector = this.beanWriter.getXMLIntrospector();
                        introspector.setLog(new LogKitLogger("betwixt"));
                        // The following is needed for EJB
                        introspector.setClassNormalizer(new ClassNormalizer() {
                            public Class normalize(Class clazz) {
                                if (Proxy.isProxyClass(clazz)
                                    && clazz.getInterfaces().length > 0) {
View Full Code Here

Examples of org.codehaus.dna.impl.LogkitLogger

    public void testLogkitLoggerEmptyCtor()
        throws Exception
    {
        try
        {
            new LogkitLogger( null );
        }
        catch( NullPointerException npe )
        {
            assertEquals( "npe.getMessage()", "logger", npe.getMessage() );
        }
View Full Code Here

Examples of org.codehaus.dna.impl.LogkitLogger

    public void testLogkitLoggerGetChildLogger()
        throws Exception
    {
        final MockLogTarget target = new MockLogTarget();
        final LogkitLogger logger = createLogger( target, Priority.DEBUG );

        assertNotSame( "logger.getChildLogger == logger",
                       logger,
                       logger.getChildLogger( "whatever" ) );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.LogkitLogger

        final String message = "Meep!";
        final Throwable throwable = null;
        final boolean output = true;

        final MockLogTarget target = new MockLogTarget();
        final LogkitLogger logger = createLogger( target, level );
        logger.trace( message );
        checkLogger( target, output, message, throwable, type );
    }
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.