wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes log4j - level restriction from upside Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j - level restriction from upside" Watch "log4j - level restriction from upside" New topic

log4j - level restriction from upside

chono ken

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.

chono ken

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

Joined: Jun 24, 2003
Posts: 3274

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.
It is sorta covered in the JavaRanch Style Guide.
subject: log4j - level restriction from upside
Similar Threads
Unable to control logging levels in Struts2 using log4j.properties
How to set Logging level (DEBUG) struts and tiles
Jar hell concerning log4j
Log4j and Threads.
Hibernate 3 -> Logging queries to file with log4j