RE: Configuring Log4J with Maven Testing and Production

2007-04-03 Thread Jacob Kjome
This might make a good wiki entry. I encourage you to enter it if you get a chance... http://wiki.apache.org/logging-log4j/UsefulCode Jake At 02:53 PM 4/3/2007, you wrote: >Mark -- > >Try this: > >1) Rename the log4j.xml file that you use for testing to something else, >perhaps test-log4j.

Re: log4j - Level creation in config file

2007-04-03 Thread Eric . Wolf
Thanks again Curt! As I have milled over in my mind your ideas and my needs, I came to your solution. I don't have to have the Formatter output AUDIT: by using the %Priority, I can make the log record look any way I want for this group of log records just like you stated below and all without

Re: log4j - Level creation in config file

2007-04-03 Thread Curt Arnold
On Apr 3, 2007, at 4:14 PM, [EMAIL PROTECTED] wrote: Thanks Curt! I like your thoughts. Here are some more details to clarify. I want to treat the "Audit" level as data for auditors and I want it to log when it is in production and the RootLogger is set to "ERROR". My plan was to exte

Re: log4j - Level creation in config file

2007-04-03 Thread Eric . Wolf
Thanks Curt! I like your thoughts. Here are some more details to clarify. I want to treat the "Audit" level as data for auditors and I want it to log when it is in production and the RootLogger is set to "ERROR". My plan was to extend or something a new "Audit" level and set it to an intege

Re: log4j - Level creation in config file

2007-04-03 Thread Curt Arnold
On Apr 3, 2007, at 1:38 PM, [EMAIL PROTECTED] wrote: Can you create new Level(s) in the configuration file (for example: log4j.level.Audit = "something here"? Or should I just extend the Level class? Thanks, Eric Wolf log4j doesn't support on-the-fly level creation in configuration f

RE: Configuring Log4J with Maven Testing and Production

2007-04-03 Thread Gallagher, Ron
Mark -- Try this: 1) Rename the log4j.xml file that you use for testing to something else, perhaps test-log4j.xml. Keep it in the src/test/resources directory. 2) Make sure that you've included a testResource entry in your pom that includes the test-log4j.xml file. Something like this:

log4j - Level creation in config file

2007-04-03 Thread Eric . Wolf
Can you create new Level(s) in the configuration file (for example: log4j.level.Audit = "something here"? Or should I just extend the Level class? Thanks, Eric Wolf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Configuring Log4J with Maven Testing and Production

2007-04-03 Thread Mark Hansen
I use Log4J and build my applications with Maven2. I have a log4j.xml config file in the src/main/resources directory so that Maven2 builds it into the JAR with my application. However, I have a different log4j.xml that I want to use with the JUnit test that run as part of my Maven build proc

Log4J 1.3 alpha-8: FixedWindowRollingPolicy.setMaxIndex(99)

2007-04-03 Thread Rajamani Sriram
Hi, I am using Log4J 1.3 alpha-8 FixedWindowRollingPolicy for RollingFileAppender to restrict the number of backed up log files. I want to restrict the number of backed up files to 99 files. For this, I use the API setMaxIndex(99). But always, log4j changes this value to 13. In the documenta