| Author |
Log4J Filters
|
Karthik Vijayarajan
Ranch Hand
Joined: Mar 13, 2005
Posts: 43
|
|
Hi, I am trying to understand some Filter configurations in log4j xml. I came across this code in my application which sounds little confusing to me. If my understanding is right, the first filter LevelMatchFilter says that Log4j should log all requests that are at level TRACE and should not consult remaining filters. I cant quite get as why i need the second filter DenyAllFilter. Can you please throw some light? Thank you. [ September 02, 2008: Message edited by: Karthik Vijayarajan ] [ September 02, 2008: Message edited by: Karthik Vijayarajan ]
|
Karthik <br />SCJP 1.4 SCWCD 1.4 SCBCD 1.3
|
 |
Paul Michael
Ranch Hand
Joined: Jul 02, 2001
Posts: 697
|
|
From the docs of DenyAllFilter:
You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise" filtering behaviour to a "deny all unless instructed otherwise" behaviour.
Hope this helps.
|
SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
|
 |
Karthik Vijayarajan
Ranch Hand
Joined: Mar 13, 2005
Posts: 43
|
|
Thank you for the response. I thought the first filter's[LevelMatchFilter] configuration establishes what the DenyAllFilter would do. The configuration doesnt seem to be posing any problems though. I guess since the LevelMatchFilter configuration returns "ACCEPT", the DenyAllFilter is not consulted at all. Thank you.
|
 |
 |
|
|
subject: Log4J Filters
|
|
|