]
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}