[jboss-jira] [JBoss JIRA] (LOGTOOL-99) Support for one-time messages

David Lloyd (JIRA) issues at jboss.org
Fri Mar 18 09:59:02 EDT 2016


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

David Lloyd resolved LOGTOOL-99.
--------------------------------
    Fix Version/s:     (was: 2.1.0.Alpha1)
       Resolution: Duplicate Issue


This is already done! Nifty.

> Support for one-time messages
> -----------------------------
>
>                 Key: LOGTOOL-99
>                 URL: https://issues.jboss.org/browse/LOGTOOL-99
>             Project: Log Tool
>          Issue Type: Feature Request
>            Reporter: David Lloyd
>            Assignee: James Perkins
>
> Add an annotation that indicates that a log message should only be logged one time.  The imlpementation would use a private static final AtomicBoolean with CAS to ensure that the message is logged one time, guarding such messages with code that is something like this:
> {code}
> AtomicBoolean someMessageCalledOnce = this.someMessageCalledOnce;
> do {
>     if (someMessageCalledOnce.get()) return;
> } while (! someMessageCalledOnce.compareAndSet(false, true));
> // ... log message here ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list