logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52401] New: Appender Threshold
Date Fri, 30 Dec 2011 18:57:49 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52401

             Bug #: 52401
           Summary: Appender Threshold
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: aiwilson79@gmail.com
    Classification: Unclassified


No logs are written whenever the appender's threshold property is set.  Below
is the configuration.  Note, the JBOSS appender is used for the root logger via
the ASYNC appender.  The FILE appender is the main application log file
appender that does *NOT* have a threshold set.  The TOPIC_APPENDER is a
JMSAppender that has it's threshold set to ERROR.  The FILE and TOPIC_APPENDER
are referenced via the APP-ASYNC appender.  This configuration prints nothing
to any logs or topic.  If I comment out the threshold on the TOPIC_APPENDER it
will log to all appenders.  I even tried a RollingFileAppender instead of the
JMSAppender and the same issue occurs if the threshold is set.

<appender name="JBOSS"
class="org.jboss.logging.appender.DailyRollingFileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
/>
            <param name="File" value="${jboss.server.log.dir}/server.log" />
            <param name="Append" value="true" />

            <!-- Rollover at midnight each day -->
            <param name="DatePattern" value="'.'yyyy-MM-dd" />

            <layout class="org.apache.log4j.PatternLayout">
                    <!--
                            The default pattern: Date Priority [Category]
Message\n
                            <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
                    -->

                    <!--
                            The full pattern: Date MS Priority [Category]
(Thread:MDC) Message\n
                    -->
                    <param name="ConversionPattern" value="%d %-5r %-5p [%c]
(%t:%X{TXID}) %m%n" />
            </layout>
    </appender>

    <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
/>
            <param name="File" value="${jboss.server.log.dir}/app.log" />
            <param name="Append" value="true" />
            <param name="Threshold" value="DEBUG" />
            <!-- Rollover at midnight each day -->
            <param name="DatePattern" value="'.'yyyy-MM-dd" />

            <layout class="org.apache.log4j.PatternLayout">
                    <!--
                            The default pattern: Date Priority [Category]
Message\n
                            <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
                    -->

                    <!--
                            The full pattern: Date MS Priority [Category]
(Thread:MDC) Message\n
                    -->
                    <param name="ConversionPattern" value="%d %-5r %-5p [%c]
(%t:%X{TXID}) %m%n" />
            </layout>
    </appender>



    <appender name="TOPIC_APPENDER" class="org.apache.log4j.net.JMSAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
/>
            <param name="Threshold" value="ERROR">
            <param name="ProviderURL" value="jnp://SERVERX:1099/" />
            <param name="InitialContextFactoryName"
value="org.jnp.interfaces.NamingContextFactory" />
            <param name="URLPkgPrefixes"
value="org.jboss.naming:org.jnp.interfaces" />
            <param name="TopicConnectionFactoryBindingName"
value="ClusteredConnectionFactory"/>
            <param name="TopicBindingName" value="errorLogTopic"/>
    </appender>

    <!-- Buffer events and log them asynchronously -->

    <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
/>
            <appender-ref ref="JBOSS" />
    </appender>

    <appender name="APP-ASYNC" class="org.apache.log4j.AsyncAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
/>
            <appender-ref ref="FILE" />
            <appender-ref ref="TOPIC_APPENDER" />
    </appender>



    <!-- ================ -->
    <!-- Limit categories -->
    <!-- ================ -->

     <!--
            This is the top of the logging configuration. APP events will not
go
            to the JBoss logger.
    -->

    <category name="com.app.pkg" additivity="false">
            <priority value="DEBUG" />
            <appender-ref ref="APP-ASYNC" />
    </category>

    <root>
            <priority value="INFO" />
            <appender-ref ref="ASYNC" />
    </root>

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message