Re: Can I change log4j configuration programatically?

2006-10-12 Thread James Stauffer
I don't change the logging config in code so I am not familiar with that but you should only have to change the level of loggers with an appender attached (at most). On 10/12/06, vincentw <[EMAIL PROTECTED]> wrote: Its seems the new level doesn't take effect. So here's what I'm trying to do.

Re: Can I change log4j configuration programatically?

2006-10-12 Thread vincentw
Its seems the new level doesn't take effect. So here's what I'm trying to do. I call a function "initLogging" to set up everything...call DOMConfigurator and pass it my log4j.xml file. So now log4j is setup with some default stuff. Now the cofig file may change the settings ie. logging level.

Re: Can I change log4j configuration programatically?

2006-10-12 Thread vincentw
Sorry, I found it...using the wrong object. Thanks James Stauffer wrote: > > AppenderSkeleton has activateOptions() and SMTPAppender extends > AppenderSkeleton so it should work. What version do you have? I > would be surprised if any 1.2.x version that is less than a fre years > old doesn't

Re: Can I change log4j configuration programatically?

2006-10-12 Thread James Stauffer
AppenderSkeleton has activateOptions() and SMTPAppender extends AppenderSkeleton so it should work. What version do you have? I would be surprised if any 1.2.x version that is less than a fre years old doesn't have that. On 10/12/06, vincentw <[EMAIL PROTECTED]> wrote: It appears that I don't

Re: Can I change log4j configuration programatically?

2006-10-12 Thread vincentw
It appears that I don't have that method...how do I get it? Do I have an older version? James Stauffer wrote: > > I believe you call it on the appender after you change its settings. > > On 10/11/06, vincentw <[EMAIL PROTECTED]> wrote: >> >> What would I call activateOptions() with? >> >> >>

RE: How to parse a log4j file

2006-10-12 Thread Scott Deboy
Nothing exists that I'm aware of that will read the patternLayout for a fileappender and parse the logs based on that. LogFilePatternReceiver can parse log files, but you have to specify the pattern you're reading (which of course would need to correspond to the patternLayout, but it's different s

RE: How to parse a log4j file

2006-10-12 Thread Scott Melcher
Yaroslav, I output my logs as XML. Therefore I just read the file in with my XML parser. -Original Message- From: Yaroslav Chinskiy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 11:35 AM To: log4j-user@logging.apache.org Subject: How to parse a log4j file Hi, Is ther

RE: How to parse a log4j file

2006-10-12 Thread Yaroslav Chinskiy
Unfortunately, this is not an XML file and I can not change that. -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 11:44 AM To: Log4J Users List Subject: Re: How to parse a log4j file If you use the XML format then you should be able to

Re: How to parse a log4j file

2006-10-12 Thread James Stauffer
If you use the XML format then you should be able to use one of a million XML parsers. The only caveat is that the ending XML tag isn't always present. On 10/12/06, Yaroslav Chinskiy <[EMAIL PROTECTED]> wrote: Hi, Is there any API to parse a log file? I don't want to use chainsaw. I have

How to parse a log4j file

2006-10-12 Thread Yaroslav Chinskiy
Hi, Is there any API to parse a log file? I don't want to use chainsaw. I have my own UI specialized for the business we do here. Today, I parse the file by reading byte[] and using some hard coded fields. I need an API where I can reuse log4j properties that where used to create a file