[jboss-jira] [JBoss JIRA] (WFCORE-481) Logging async-handler improvement - report number dropped logs

James Perkins (JIRA) issues at jboss.org
Tue Dec 16 16:40:30 EST 2014


     [ https://issues.jboss.org/browse/WFCORE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Perkins moved WFLY-4178 to WFCORE-481:
--------------------------------------------

              Project: WildFly Core  (was: WildFly)
                  Key: WFCORE-481  (was: WFLY-4178)
    Affects Version/s:     (was: 8.0.0.Final)
          Component/s: Logging
                           (was: Logging)


> Logging async-handler improvement - report number dropped logs
> --------------------------------------------------------------
>
>                 Key: WFCORE-481
>                 URL: https://issues.jboss.org/browse/WFCORE-481
>             Project: WildFly Core
>          Issue Type: Enhancement
>          Components: Logging
>            Reporter: Todd Sandor
>            Assignee: James Perkins
>
> The functional requirement is to know when logs are discarded and the number of logs discarded.  
> When using a async-handler such as the one below, we do not know if/when logs are discarded, thousands could be dropped and we do not know it.
>             <async-handler name="ASYNC">
>                 <queue-length value="300000"/>
>                 <overflow-action value="discard"/>
>                 <subhandlers>
>                     <handler name="FILE"/>
>                 </subhandlers>
>             </async-handler>
> Potential solution/suggestion:
> Add a new property, call it max-discard-logs, with a default value of 1 - uses existing behavior when = 1 (when queue full, drop any new log).
> When > 1 and queue is full, at least max-discard-logs logs are removed from the queue and display a log indicating the queue is full an N logs were dropped.
>             <async-handler name="ASYNC">
>                 <queue-length value="300000"/>
>                 <overflow-action value="discard"/>
>                 <max-discard-logs value="1000"/>
>                 <subhandlers>
>                     <handler name="FILE"/>
>                 </subhandlers>
>             </async-handler>
> Depending upon the type of queue being used in the implementation, this could be a very simple change.  
> e.g
> https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingQueue.html
> int 	drainTo(Collection<? super E> c, int maxElements)
> Removes at most the given number of available elements from this queue and adds them to the given collection.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list