Package org.apache.log

Examples of org.apache.log.Hierarchy


    }

    private LogkitLogger createLogger( final MockLogTarget target,
                                       final Priority priority )
    {
        final Hierarchy hierarchy = new Hierarchy();
        final Logger logkitLogger = hierarchy.getLoggerFor( "test" );
        logkitLogger.setLogTargets( new LogTarget[]{target} );
        logkitLogger.setPriority( priority );
        final LogkitLogger logger = new LogkitLogger( logkitLogger );
        return logger;
    }
View Full Code Here


        if (cfg == null) {
            return;
        }

        // Make sure same hierarchy is used
        Hierarchy hier = Hierarchy.getDefaultHierarchy();
        LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        try {
            Configuration c = builder.buildFromFile(cfg);
View Full Code Here

     * own LoggerManager running on top of LogKit flavour.
     */
    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 );

View Full Code Here

    /**
     * Creates a new <code>DefaultLogKitManager</code>. It will use a new <code>Hierarchy</code>.
     */
    public DefaultLogKitManager()
    {
        this( new Hierarchy() );
    }
View Full Code Here

     * Creates a new <code>DefaultLogKitManager</code> using
     * specified logger name as root logger.
     */
    public DefaultLogKitManager( final String prefix )
    {
        this( prefix, new Hierarchy() );
    }
View Full Code Here

     * @param logger the Avalon Logger
     * @return the LogKit Logger
     */
    public static org.apache.log.Logger createLogger( final Logger logger )
    {
        final Hierarchy hierarchy = new Hierarchy();
        final org.apache.log.Logger logKitLogger = hierarchy.getLoggerFor( "" );
        final LogKit2AvalonLoggerAdapter target =
            new LogKit2AvalonLoggerAdapter( logger );
        logKitLogger.setLogTargets( new LogTarget[ ] { target } );
       
        if ( logger.isDebugEnabled() )
View Full Code Here

  {
    String cfg = p.getProperty("log_config");
    if (cfg==null) return;
   
    //Make sure same hierarchy is used
    Hierarchy hier = Hierarchy.getDefaultHierarchy();
    LogKitLoggerManager manager = new LogKitLoggerManager(
        null,hier,null,null
        );
   
    DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
View Full Code Here

        super( prefix, switchToCategory, defaultLoggerOverride );
        m_prefix = prefix;

        if ( hierarchy == null )
        {
            m_hierarchy = new Hierarchy();
            m_hierarchy.getRootLogger().unsetLogTargets( true );
            final ErrorHandler errorHandler = new OurErrorHandler( getLogger() );
            m_hierarchy.setErrorHandler( errorHandler );
        }
        else
View Full Code Here

        if (cfg == null) {
            return;
        }

        // Make sure same hierarchy is used
        Hierarchy hier = Hierarchy.getDefaultHierarchy();
        LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        try {
            Configuration c = builder.buildFromFile(cfg);
View Full Code Here

     * @param logger the Avalon Logger
     * @return the LogKit Logger
     */
    public static org.apache.log.Logger createLogger( final Logger logger )
    {
        final Hierarchy hierarchy = new Hierarchy();
        final org.apache.log.Logger logKitLogger = hierarchy.getLoggerFor( "" );
        final LogKit2AvalonLoggerAdapter target =
            new LogKit2AvalonLoggerAdapter( logger );
        logKitLogger.setLogTargets( new LogTarget[ ] { target } );
        return logKitLogger;
    }
View Full Code Here

TOP

Related Classes of org.apache.log.Hierarchy

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.