Examples of LoggerManager


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

        throws ServletException
    {
        ServletContext context = config.getServletContext();

        // Initialize logging for the servlet.
        LoggerManager loggerManager =
            (LoggerManager)context.getAttribute( LoggerManager.class.getName() );
        if ( loggerManager == null )
        {
            throw new IllegalStateException(
                "The ExcaliburComponentManagerServlet servlet was not correctly initialized." );
        }
        Logger logger = loggerManager.getLoggerForCategory( "servlet" );
        m_logger = logger.getChildLogger( m_referenceName );

        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "servlet.init( config )" );
View Full Code Here

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

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

     * 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

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

        {
            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

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

        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

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

        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

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

        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

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

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

     * 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

Examples of org.codehaus.plexus.logging.LoggerManager

        Maven maven = null;

        MavenExecutionRequest request = null;

        LoggerManager loggerManager = null;

        try
        {
            // logger must be created first
            loggerManager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );

            if ( debug )
            {
                loggerManager.setThreshold( Logger.LEVEL_DEBUG );
            }
            else if ( commandLine.hasOption( CLIManager.QUIET ) )
            {
                // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
                // Ideally, we could use Warn across the board
                loggerManager.setThreshold( Logger.LEVEL_ERROR );
                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer(), executionProperties );
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.