AW: Need to log based on criteria other than simply levels

2004-03-24 Thread gyoergy.magoss
Wouldn't it be possible to use Logger.log(Priority,Object) instead of e.g. Logger.debug(Object)? In this case you could set Priority depending on user and process/program/class and pass it along with the message object to log4j. You would than have only one logger per application (thus saving mem

Problems with my classpath?

2004-03-24 Thread Eliezer Chavez
When i run my application with java -classpath runs well But when i run normally: export CLASSPATH Then Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator at com.banvenez.xpert.integrity.util.AppLog.(AppLog.java:12) at com.banvenez.xp

RE: Need to log based on criteria other than simply levels

2004-03-24 Thread Scott Deboy
Simon's suggestions are good. The CVS tip of log4j provides a number of capabilities you may find useful, if you are in a position to use it. 1. You could use a logger naming convention as Simon mentioned and a custom Appender to set the first part of the logger name as a 'userid' Property on t

Re: Need to log based on criteria other than simply levels

2004-03-24 Thread Simon Kitching
On Thu, 2004-03-25 at 17:25, Mak Carson wrote: > Hi, > > I'm comtemplating using log4j in an application that takes input from users(u1 - > u99) with in 10 different processes -programs/classes- (p1 - p10). > > I understand how to use log4j to turn logging on and off based on a trace level. >

Need to log based on criteria other than simply levels

2004-03-24 Thread Mak Carson
Hi, I'm comtemplating using log4j in an application that takes input from users(u1 - u99) with in 10 different processes -programs/classes- (p1 - p10). I understand how to use log4j to turn logging on and off based on a trace level. However, I also need to be able to selectively log based on an

Re: log4j.properties

2004-03-24 Thread Paul Smith
On Thu, 2004-03-25 at 09:23, Arora, Avinash wrote: > Hi, > I am using Log4j first time. So my question may appear trivial. What > is difference between log4j.rootCategory and log4j.rootLogger > properties? In the log4j.properties can we specify either of them? Historically Logger's were known as

log4j.properties

2004-03-24 Thread Arora, Avinash
Hi, I am using Log4j first time. So my question may appear trivial. What is difference between log4j.rootCategory and log4j.rootLogger properties? In the log4j.properties can we specify either of them? Avinash Arora - To u

Re: Is there a 'buffered' logging concept? ie. buffering message prior to knowing the Category of a logger

2004-03-24 Thread Charles Tuckey
Hi, I had this problem with an application we are developing as well. Prior to setting up the logging a number of initialization steps are performed which may result in loggin messages being generated. I didn't want to print these until I knew whether they should be printed and how they should

Is there a 'buffered' logging concept? ie. buffering message prior to knowing the Category of a logger

2004-03-24 Thread Ian Huynh
In normal usage of Log4J, this is a standard practice Logger logger = Logger.getLogger("com.acme.someclass"); if (logger.isDebugEnabled()) { logger.debug("This is my debug message" ); } What if the Category (ie 'com.acme.someclass') isn't a static value but some dynamic value ? O

Re: AW: No appenders could be found for logger()

2004-03-24 Thread Jacob Kjome
Well, you said that it works at least once, but doesn't work upon reaload. If the code you have below works once, I don't know why it shouldn't work every time. The fact that removing LogManager.shutdown() solves your issue is odd to say the least. If you figure out anything else with this i