The moose likes Other Open Source Projects and the fly likes log4j - level restriction from upside Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "log4j - level restriction from upside" Watch "log4j - level restriction from upside" New topic
Author

log4j - level restriction from upside

chono ken
Greenhorn

Joined: Jan 04, 2005
Posts: 6
Hi all,

how can I restrict debug level from "upside".

I want log into the first log file just levels INFO and down (<=INFO)
and into another log file just levels ERROR and up (ERROR<=)

I can restrict from downside, but I don't know how from upside?

I use log4j.properties file listed below.


I get two *.log files:
In the "errout.log" file I get errors and fatals - that's OK.
But in the "stdout.log" file I get debug, info, warn - that's OK - BUT ERRORS, FATALS too - I don't it want.

Please, help.

Thanks.
chono ken
Greenhorn

Joined: Jan 04, 2005
Posts: 6
Please, any idea?
...Or this is so stupid question?
Thank You.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Have a search of this forum, the question has been answered several times before...


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: log4j - level restriction from upside
 
Similar Threads
Jar hell concerning log4j
Unable to control logging levels in Struts2 using log4j.properties
How to set Logging level (DEBUG) struts and tiles
Log4j and Threads.
Hibernate 3 -> Logging queries to file with log4j