[jboss-jira] [JBoss JIRA] (LOGTOOL-99) Support for one-time messages
David Lloyd (JIRA)
issues at jboss.org
Fri Mar 18 08:08:00 EDT 2016
David Lloyd created LOGTOOL-99:
----------------------------------
Summary: 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
Fix For: 2.1.0.Alpha1
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