Package org.apache.avalon.excalibur.logger

Examples of org.apache.avalon.excalibur.logger.LoggerManager


    public static LoggerManager createLogKitConfigurable(
            final String prefix, final String switchTo )
    {
        final org.apache.log.Hierarchy hierarchy = new Hierarchy();

        final LoggerManager bare = new LogKitAdapter( hierarchy );
        final LoggerManager decorated = applyDecorators( bare, prefix, switchTo );
        final LoggerManagerTee tee = new LoggerManagerTee( decorated );

        tee.addTee( new LogKitLoggerHelper( hierarchy ) );
        tee.addTee( new LogKitConfHelper( hierarchy ) );
        tee.makeReadOnly();
View Full Code Here


     * will go to System.err however.
     */
    public static LoggerManager createLog4JConfigurable(
            final String prefix, final String switchTo )
    {
        final LoggerManager bare = new Log4JConfAdapter();
        final LoggerManager decorated = applyDecorators( bare, prefix, switchTo );
        return decorated;
    }
View Full Code Here

        {
            final Context implContext = m_contextManager.getChildContext();

            final ServiceManager serviceManager =
                    (ServiceManager) getContextEntry( managerContext, SERVICE_MANAGER );
            final LoggerManager loggerManager =
                    (LoggerManager) serviceManager.lookup( LoggerManager.ROLE );

            ContainerUtil.enableLogging( instance, loggerManager.getDefaultLogger() );
            ContainerUtil.contextualize( instance, implContext );

            ContainerUtil.service( instance, serviceManager );

            final Configuration config =
View Full Code Here

        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);
View Full Code Here

        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("portlet-context", this.portletContext);
View Full Code Here

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        Configuration sysConfig  = builder.buildFromFile(sysConfigFilename);
        Configuration roleConfig = builder.buildFromFile(roleConfigFilename);

        // Create the LoggerManager for Log4J
        LoggerManager lm = new Log4JLoggerManager();

        // Setup the RoleManager
        DefaultRoleManager roles = new DefaultRoleManager();

        Logger logger = lm.getLoggerForCategory(AVALON_LOG_CATEGORY);

        roles.enableLogging(logger);
        roles.configure(roleConfig);

        // Setup ECM
View Full Code Here

    public static LoggerManager createLogKitConfigurable(
            final String prefix, final String switchTo )
    {
        final org.apache.log.Hierarchy hierarchy = new Hierarchy();

        final LoggerManager bare = new LogKitAdapter( hierarchy );
        final LoggerManager decorated = applyDecorators( bare, prefix, switchTo );
        final LoggerManagerTee tee = new LoggerManagerTee( decorated );

        tee.addTee( new LogKitLoggerHelper( hierarchy ) );
        tee.addTee( new LogKitConfHelper( hierarchy ) );
        tee.makeReadOnly();
View Full Code Here

     * will go to System.err however.
     */
    public static LoggerManager createLog4JConfigurable(
            final String prefix, final String switchTo )
    {
        final LoggerManager bare = new Log4JConfAdapter();
        final LoggerManager decorated = applyDecorators( bare, prefix, switchTo );
        return decorated;
    }
View Full Code Here

        {
            final String message =
                REZ.getString( "logger-create", sarName, version );
            getLogger().debug( message );
        }
        final LoggerManager loggerManager = createLoggerManager( version );
        ContainerUtil.enableLogging( loggerManager, getLogger() );
        ContainerUtil.contextualize( loggerManager, context );
        ContainerUtil.configure( loggerManager, logs );
        return loggerManager.getDefaultLogger();
    }
View Full Code Here

        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("portlet-context", this.portletContext);
View Full Code Here

TOP

Related Classes of org.apache.avalon.excalibur.logger.LoggerManager

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.