Did you look at the quoted messages? It's all right there. I cut out the other responses so you can see just what I posted.
On Wed, Jun 17, 2009 at 3:41 PM, Jacob Kjome <h...@visi.com> wrote: > List your entire logging properties and restate your requirements. I'm > lost on what you tried and didn't try. > > On Mon, 8 Jun 2009 14:45:10 -0400 >>> Bai Shen <baishen.li...@gmail.com> wrote: >>> >>> Okay, that sort of worked. This was how I had my log4j.properties >>>> setup. >>>> >>>> log4j.rootLogger=WARN, CONSOLE, FILE >>>> log4j.logger.com.myapp=INFO, FILE >>>> log4j.additivity.com.myapp=false >>>> >>>> So I got rid of the additivity line and replaced it with the threshold >>>> line. Now I'm getting double outputs to the file from the loggers. I >>>> want >>>> all things INFO or higher from my app to be logged in the file only. I >>>> want >>>> everything WARN or higher to be logged in both the console and the file. >>>> >>>> And why does the threshold work? Isn't that what the first argument >>>> after >>>> the = is for? >>>> >>>> -----Original Message----- >>>>> From: Bai Shen [mailto:baishen.li...@gmail.com] >>>>> Sent: Friday, June 05, 2009 2:09 PM >>>>> To: log4j-user@logging.apache.org >>>>> Subject: Logging to console and file at different levels >>>>> >>>>> I have a web service using Axis and running on Tomcat. I'm using slf4j >>>>> piping to log4j. I have the root logger set to WARN and to output to a >>>>> file >>>>> and the console. I also have a logger setup for just my application >>>>> set >>>>> to >>>>> INFO logging to the file. I had to turn off addivity in order to get >>>>> it >>>>> to >>>>> not log to the console. >>>>> >>>>> What I'd like to do is have my application still log any WARN messages >>>>> in >>>>> the console as well as the file. But I don't want any of the INFO >>>>> messages >>>>> in the console. How do I configure my setup to do that? >>>>> >>>>> TIA. >>>>> >>>>