RE: Using a Custom Filter

2010-05-13 Thread Andy McBride
Hi Simon, I think that the level applied to a Logger instance is evaluated first so that in this case anything below INFO is dropped by the Logger and therefore the event does not get as far as being posted into the filters/appenders. Filtering the event by setting the Logger level allows lower

Re: Using a Custom Filter

2010-05-13 Thread Scott Deboy
Here's a link to the source of a filter which works (javadoc also provides an example configuration). Maybe this will help. http://logging.apache.org/log4j/companions/extras/xref/org/apache/log4j/filter/AndFilter.html Scott On Thu, May 13, 2010 at 2:09 PM, simon wrote: > Hi log4j-users, > > I

Re: Logging a specific package in log4j programmatically

2010-05-13 Thread Jacob Kjome
Well, you can either tell the client to write the log4j.properties properly or just set a system property pointing to the file you want to use (note that it needs to be a valid URL), e.g., On Windows... java -Dlog4j.configuration=file:/c:/logs/log4j.properties OR java -Dlog4j.configuratio

Using a Custom Filter

2010-05-13 Thread simon
Hi log4j-users, I'm having problems with a custom filter not working as I would expect and would welcome any explanation you are able to give. I have created a very simple filter that always returns Filter.ACCEPT from within decide(), however as I raise level of my logger set in the configuration

Logging a specific package in log4j programmatically

2010-05-13 Thread vintem
Hi there, here is the thing, I have to deploy a web app and the the log4j.properties file is created by the client so I dont have control over it. Their properties file is like this: log4j.rootCategory= FILE !---FILE--! log4j.category.FILE=DEBUG log4j.appender.FILE=org.apach