RFR 2: JDK-8005263: Logging APIs takes Supplier<String> for message

Henry Jen henry.jen at oracle.com
Sat Dec 29 02:30:55 UTC 2012

On Dec 28, 2012, at 4:11 PM, Henry Jen <henry.jen at oracle.com> wrote:

> Next version I'll enable defer message construction until Logger filter check.

On a second thought and after more reading into logging code in JDK, it seems like Filter is mostly applied to Handler instead of Logger, thus it's not really that beneficial.

I also didn't find a way to configure Logger filter except programmed via setFilter API, that's another evidence that rarely a filter is applied to a Logger.

There is no guarantee that Filter won't cause side-effect with lazy message construction on LogRecord although it's much less likely as Handler could do.

Given all those factors, I don't think it's mature to implement.


More information about the core-libs-dev mailing list