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 45753] Code contribution: BurstFilter for extras
Date Sun, 02 Oct 2011 17:34:16 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45753

--- Comment #7 from Chad LaVigne <chad_lavigne@yahoo.com> 2011-10-02 17:34:16 UTC ---
Hi Ralph,

The unit test should work, although it's a little hard to read the results. You
should see 100 of 110 info log statements print with the first test, then
there's a second test that does 110 fatal log statements that should all print
because they are fatals and finally you should see 30 new info logs print
because the test waits 18 seconds and should then print 30 info statements (the
burst recovery rate is 10 log statements every 6 seconds).  So, is the test
printing all 110 info statements for you?  You see a line like this that has
"#110" at the end?

INFO  02-Oct-2011 12:23:27  main Logging 110 messages, should only see 100 logs
# 110

It's a little tough to notice the statement number, but you shouldn't be seeing
that, it the last info statement that prints should be #100, then you should
see 110 fatals, then 30 infos.  Anyway, it would probably be better if we had
an actual JUnit test that had asserts but I figured we didn't want to add a
dependency on JUnit.  Is that true or would a JUnit test be preferred?

As for the synchronization, I think it's necessary to ensure that we don't
exceed maxTokens, right?

(In reply to comment #5)
> I tried adding this to my Log4j 2.0 branch but am having some problems. It
> isn't passing the unit test. It seems to me that when the filter is called it
> does nothing until fillInterval has expired. Since the first until test runs
> right away it is successfully writing 110 records instead of 100.
> 
> I'm also concerned with the synchronization as it could cause a bottleneck.

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