RE: How to parameter the logfilename with log4j?
I am really sorry about that. I didn't know it. It won't happen again. Should I start a new thread with the question i asked? -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: jueves, 18 de enero de 2007 1:30 To: Tomcat Users List Subject: Re: How to parameter the logfilename with log4j? When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to parameter the logfilename with log4j?
Hello, I have an application that uses log4j. In the application, I would like the user to choose the log file directory and the logfile name (using fileChooser). Now, how can I pass this information to log4j so it uses this filename as logfile? For the moment, I use as default: C:\App\log.html Here is the log4j.properties file I am using: === log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=C:\App\log.html log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{dd-MM- HH:mm:ss} %-5p (%C:%M:% L) - %m%n = Thanks -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: miércoles, 17 de enero de 2007 11:24 To: Tomcat Users List Subject: Re: HTTP response code 200 - in access log Andreas Deller wrote: Hi A typical entry looks like this: 192.168.11.11 - - [05/Jan/2007:11:23:59 +0100] GET /ebanking/css/custom.css HTTP/1.1 200 - https://some.bank.ch/ebanking/login; Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322) This results in the client getting back a 200, but no contents for that specific request. With 'static files' I mean that this only happens when the client requests a static file like JPG or CSS. If it calls a servlet, that response is always returned correctly; just the embedded static files sporadically show this '200 -' problem. The 200 status code simply means that the server thinks the file is correctly delivered. (All HTTP requests, regardless of success or failure have a numeric status code associated with the result. You should not have any custom error pages configured for this code.) What is your setup? Tomcat alone, or Tomcat + Apache HTTPD? Can you request the CSS or image independently of the servlet in which it is referenced? Have you sanity checked all of the files to make sure they're where you expect them to be? Regards Andy Pid wrote: Andreas Deller wrote: Hi I posted this unsuccessfully a week ago under 'Tomcat 4.1.30/5.0.28 empty responses - return code 200 -', so I rephrase and shorten my question. OS: Solaris Debian, Tomcat version 4.1.30 and 5.0.28. In the access logs, there are a number of entries with the HTTP status code 200 -. So the client never sees the contents of these files, resulting in incorrect layout (the problem just turns up with static files). I've tried the Tomcat doc, Google, FAQ, mailing lists to no avail. What am I doing wrong? Thanks Andy Deller Can't see your original message in the list i'm afraid. I don't understand your question either - you're saying that you see a 200 in the logs, the server returns a static file (do you mean an empty file?). Can you, perhaps, explain in more detail? p - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to parameter the logfilename with log4j?
Actually, what I want to do is being able to modify the logfilename during runtime. -Original Message- From: Bachler, Elisabeth (Elisabeth) [mailto:[EMAIL PROTECTED] Sent: miércoles, 17 de enero de 2007 11:40 To: Tomcat Users List Subject: How to parameter the logfilename with log4j? Hello, I have an application that uses log4j. In the application, I would like the user to choose the log file directory and the logfile name (using fileChooser). Now, how can I pass this information to log4j so it uses this filename as logfile? For the moment, I use as default: C:\App\log.html Here is the log4j.properties file I am using: === log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=C:\App\log.html log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{dd-MM- HH:mm:ss} %-5p (%C:%M:% L) - %m%n = Thanks -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: miércoles, 17 de enero de 2007 11:24 To: Tomcat Users List Subject: Re: HTTP response code 200 - in access log Andreas Deller wrote: Hi A typical entry looks like this: 192.168.11.11 - - [05/Jan/2007:11:23:59 +0100] GET /ebanking/css/custom.css HTTP/1.1 200 - https://some.bank.ch/ebanking/login; Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322) This results in the client getting back a 200, but no contents for that specific request. With 'static files' I mean that this only happens when the client requests a static file like JPG or CSS. If it calls a servlet, that response is always returned correctly; just the embedded static files sporadically show this '200 -' problem. The 200 status code simply means that the server thinks the file is correctly delivered. (All HTTP requests, regardless of success or failure have a numeric status code associated with the result. You should not have any custom error pages configured for this code.) What is your setup? Tomcat alone, or Tomcat + Apache HTTPD? Can you request the CSS or image independently of the servlet in which it is referenced? Have you sanity checked all of the files to make sure they're where you expect them to be? Regards Andy Pid wrote: Andreas Deller wrote: Hi I posted this unsuccessfully a week ago under 'Tomcat 4.1.30/5.0.28 empty responses - return code 200 -', so I rephrase and shorten my question. OS: Solaris Debian, Tomcat version 4.1.30 and 5.0.28. In the access logs, there are a number of entries with the HTTP status code 200 -. So the client never sees the contents of these files, resulting in incorrect layout (the problem just turns up with static files). I've tried the Tomcat doc, Google, FAQ, mailing lists to no avail. What am I doing wrong? Thanks Andy Deller Can't see your original message in the list i'm afraid. I don't understand your question either - you're saying that you see a 200 in the logs, the server returns a static file (do you mean an empty file?). Can you, perhaps, explain in more detail? p - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to parameter the logfilename with log4j?
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]