RE: Appender per Thread (rootLogger contention)

2005-08-16 Thread Bender Heri
Hi Using an own written RepositorySelector is a reasonably way of having different logger universes within the same JVM. Using the standard selector returns always the same logger instance for a given name, since it it is stored within the unique default repository. A self written selector

Log4j Configuration

2005-08-16 Thread William Mok
Hi, I have the following log4j.properties file: --- # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO,

RE: Log4j Configuration

2005-08-16 Thread Harp, George
I don't have to put any configuration code in my appliaction I just make sure that log4j.properties or log4j.xml is in the clas path. -Original Message- From: William Mok [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 12:35 PM To: log4j-user@logging.apache.org Subject: Log4j

Re: Log4j Configuration

2005-08-16 Thread William Mok
Thanks, I have included the log4j.properties file in the CLASSPATH and restart tomcat, but I could not find any log file generated under the entire tomcat directory, after running the servlet. - Original Message - From: Harp, George [EMAIL PROTECTED] To: 'Log4J Users List'

RE: Log4j Configuration

2005-08-16 Thread Harp, George
You seem to be running it to the console -- Sys.out and axis.log ... if it doesn't hurt your application hard code a directory prefix and then you'll know where it ends up ie log4j.appender.LOGFILE.File=axis.log to log4j.appender.LOGFILE.File=c:\axis.log in log4j.xml I can use java properties so

Re: Log4j Configuration

2005-08-16 Thread William Mok
Thanks, I changed the line to log4j.appender.LOGFILE.File=/sandbox/axis.log reatart tomcat, but the axis.log still does not exist. Another problem is that even I have specified the properties file in CLASSPATH, I got this warning when I try to deploy my servlet. Somehow it just cannot find the

Re: Log4j Configuration

2005-08-16 Thread Rick_Herrick
Also add calls to other debug levels. I've had some real issues with the debug levels, what they get set to, and what I've thought they should get set to. So I'd go ahead and add: Logger logger = Logger.getLogger(EchoService.class); // Really, you shouldn't do this and instead set it with your

Re: Log4j Configuration

2005-08-16 Thread William Mok
Thanks. Rick. I am going to try all the stuff u advise. However, the thing I don't understand is how the log4j. properties file work with the FileAppender API call in the code. What I mean is the log4j.properties specify a file appender, and then in the code I specify another file appender,

Re: Log4j Configuration

2005-08-16 Thread William Mok
I have put log4j.properties under the directory where I have the class files, i.e. EchoService.class I have also included the code to test whether the properties file is being loaded, but I think the result is negative b'cos I cannot find the logging in catalina.out file. i.e. the classloader

Re: Log4j Configuration

2005-08-16 Thread Rick_Herrick
If you create an appender programmatically and independently of the properties file, then it will simply work as an additional appender for that logger and be completely unaffected by the settings in the properties file. Note that you can do this same thing with the properties file and in fact,

Re: EOFException when using SocketAppender?

2005-08-16 Thread Sam Preston
Thanks, as it turns out a library I was using had a static initialization block that took it upon itsself to load its own configuration, overriding my settings (and apparently making the SocketAppender disconnect?). Sorry for the premature post. -Sam On 8/15/05, Bradley, Todd [EMAIL PROTECTED]

Re: Log4j Configuration

2005-08-16 Thread William Mok
Thanks. Your explanation make everything much clearer. I modified the log4j.properties file and run the servlet again, I can only see empty file axis.log being created but there is no logging inside. Also the check for ClassLoader seems to fail, i.e. cl = NULL as I cannot find the Search and

How to remove the logger instance?

2005-08-16 Thread zhvfeng
Hi, My app need to dynamically create many loggers, is there any way to remove the logger instance at runtime? Otherwise, I'm afraid, the memory will be increased continuously. Regards