How do I get a Level object from a Priority object

2002-06-12 Thread Kn, Guruprasad (MED)
Hi We were using a very old version of log4J. Recently shifted to 1.2.3. However I am faced with a backward compatibility problem. I will try to explain the problem as best as I can. Priority class doc says that do not use Priority directly and use Level instead. LoggingEvent class has a field

FileAppender - can't find my ouput log file

2002-06-12 Thread Louis Voo
Hi, I try to use log4j in my web application, but I have a problem to using FileAppender, I can't find the output log file. If I change it to ConsoleAppender, then the output is on the screen and work fine. Here is my config file: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE

Re: FileAppender - can't find my ouput log file

2002-06-12 Thread Ceki Gülcü
Can the file be under the current directory, i.e. the directory where you started tomcat from. Also check if log4j took notice of your config file: Change: log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; to log4j:configuration debug=ture

Bug with Telnet and RollingFileAppender ?

2002-06-12 Thread Marc Herren
Hi , I started to test log4j as log facility for our application. During those test I found the following problem : When running one instance of our program everything works fine but as soon as there are two or multiple instances of our program running the Telnet and RollingFileAppender

Re: FileAppender - can't find my ouput log file

2002-06-12 Thread Louis Voo
Hi, Thanks for your reply, and I found the file under c:\Documents and Settings\Louis\Start Menu\Programs\Apache Tomcat 4.0. Can you tell me how to set the output file to my web application directory? For example, my application is under e:\webapp\testapp\ I want to set the output file

RE: FileAppender - can't find my ouput log file

2002-06-12 Thread Thomas Tuft Muller
| Hi, | Thanks for your reply, and I found the file under c:\Documents and | Settings\Louis\Start Menu\Programs\Apache Tomcat 4.0. | Can you tell me how to set the output file to my web application | directory? For example, my application is under | e:\webapp\testapp\ I want | to set

RE: getClassName from locationInfo object

2002-06-12 Thread Steve . Lewis
Well, I'm extending the JDBCAppender to use its own thread, and to use a prepared statement, so I have my own columns for classname, etc. I'm using (in development) Win 2000 and WebLogic 6.1. I'm going to try to put some log4j calls in actual classes (not JSPs) and see if it can pick it up.

RE: Bug with Telnet and RollingFileAppender ?

2002-06-12 Thread Shapira, Yoav
Howdy, Do the two programs (or n instances of the program, in general) have the exact same log4j configuration file? i.e. are they writing to the same RollingFileAppender, and using the same TelnetAppender? Yoav Shapira Millennium ChemInformatics -Original Message- From: Marc Herren

RE: Bug with Telnet and RollingFileAppender ?

2002-06-12 Thread Marc Herren
Hi, I just had a phone call with Ceki. The problem was that I had two instances of my application with exactly the same log4j config. By using a TelnetAppender only the first could create a socket and the second failed because the port was already in use. The same for the

RE: getClassName from locationInfo object

2002-06-12 Thread Klein, Scott @ TW
The recommendation to not us %C is purely a speed issue as far as I know. I also had a similar problem, and here is what fixed it: log4j.appender.APPENDER_NAME.locationInfo=true where APPENDER_NAME is, well, the name of the appender ;) enjoy. -Original Message- From: [EMAIL PROTECTED]

Re: FileAppender - can't find my ouput log file

2002-06-12 Thread Louis Voo
Hi Thomas, Yes, I have a simple init servlet similar like your one, however I did try your servlet, but the problem is still exists, the log file is not save under log directory, it saved in C:\Documents and Settings\Louis\Start Menu\Programs\Apache Tomcat 4.0. I thought is tomcat or

RE: FileAppender - can't find my ouput log file

2002-06-12 Thread Thomas Tuft Muller
You probably have the wrong path for the file parameter in the appender section(s). Notice that my init servlet sets the log.home System property. The appenders defined in log4j.xml can then refer to this folder like this: appender name=MAIN

NTEventLogAppender.dll

2002-06-12 Thread Mittal, Manisha
Hi, I am trying to use NTEventLogAppender. The Log4J documentation talks about NTEventLogAppender.dll, where do I get this file? Thanks, Manisha- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

RE: getClassName from locationInfo object

2002-06-12 Thread Steve . Lewis
Okay, sounds good. Is locationInfo a field in log4j somewhere? The JDBCAppender extends the AppenderSkeleton class, which doesn't seem to have a locationInfo method. I can add the field, but how does log4j pick that up? Is the JMX smart enough to do that? Thanks, Steve

RE: getClassName from locationInfo object

2002-06-12 Thread Klein, Scott @ TW
well, you are correct. I hadn't bothered to look in depth once I got mine working ;) The setLocationInfo() seems only to be in Async, JMS, Socket(Hub) and SMTP appenders...as well as XML and HTML layouts. Since you don't use any of those...sorry. I honestly don't know enough about how and when

How to simulate System.out.println() ??

2002-06-12 Thread Bomb Diggy
Hi, I've got Log4j(1.2.3) integrated into my code and it's rockin. But, there are certain statements I want printed all the time regardless of the 'Priority/Level' of my logger - kind of like a System.out.println(). My setup is basic since I'm still new to Log4j. I would like to effectively

RE: NTEventLogAppender.dll

2002-06-12 Thread Colin MacDonald
-Original Message- I am trying to use NTEventLogAppender. The Log4J documentation talks about NTEventLogAppender.dll, where do I get this file? It's in the log4j 1.2 release under: jakarta-log4j-1.2\src\java\org\apache\log4j\nt I don't remember when it became available, so it

RE: NTEventLogAppender.dll

2002-06-12 Thread Mittal, Manisha
Thanks, I will try this. Manisha- -Original Message- From: Colin MacDonald [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:20 AM To: Log4J Users List Subject: RE: NTEventLogAppender.dll -Original Message- I am trying to use NTEventLogAppender. The Log4J

RE: getClassName from locationInfo object

2002-06-12 Thread Steve . Lewis
okay, I'll look at those other appenders and see what they extend, etc. Thanks! St Klein, Scott @

RE: NTEventLogAppender.dll

2002-06-12 Thread Ceki Gülcü
No actually it is not. This is an omission that will be fixed in 1.2.4. Sorry about the hassle. At 12:20 12.06.2002 -0400, you wrote: -Original Message- I am trying to use NTEventLogAppender. The Log4J documentation talks about NTEventLogAppender.dll, where do I get this file?

RE: NTEventLogAppender.dll

2002-06-12 Thread Colin MacDonald
Oh, my version just identifies itself as 1.2. I take it the .dll got left out at some point? It's been a few months since I messed with it, so I may have pulled it from elsewhere. - Colin MacDonald | Software Developer |

RollingFileAppender.Append doesn't work

2002-06-12 Thread mstarkie
Hi, I've searched the archives for a solution but can't find any related articles. My log file (trace.log) keeps growing for each invocation of my app (i.e., does not get truncated ) despite the following log4J appender configuration: log4j.logger.com.something.RediQuoteController=DEBUG, T

Re: FileAppender - can't find my ouput log file

2002-06-12 Thread Louis Voo
Thanks Thomas, it works now!!! - Original Message - From: Thomas Tuft Muller [EMAIL PROTECTED] To: Log4J Users List [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 4:01 PM Subject: RE: FileAppender - can't find my ouput log file You probably have the wrong path for the file

RE: How to simulate System.out.println() ??

2002-06-12 Thread Aaron Hoyt
You will need to extend Level, and you will probably then need to extend Logger. Aaron Hoyt ph: 816.218.2951 VML 250 Richards Rd Suite 255 Kansas City, MO 64116 -Original Message- From: Bomb Diggy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:14 AM To: [EMAIL

JDBCAppender problem

2002-06-12 Thread Jyothi Panduranga
Hi, I am trying to run the example program 'Sort' with some modification to 'sort1.lcf' file. I have attached the 'sort1.lcf' file. I trying to write the log to SQL database. I am getting this following error when I ran 'Sort' program. Can anybody please tell me what I need to do to fix

FW: JDBCAppender problem

2002-06-12 Thread Jyothi Panduranga
Oops.. Here is the 'sort1.lcf' file sort1.lcf Jyothi -Original Message- From: Jyothi Panduranga Sent: Wednesday, June 12, 2002 10:45 AM To: '[EMAIL PROTECTED]' Subject: JDBCAppender problem Hi, I am trying to run the example program 'Sort' with some

RE: JDBCAppender problem

2002-06-12 Thread Klein, Scott @ TW
BufferSize, db URL, User, Password are the parameter names - capitalization counts log4j.appender.JDBC=org.apache.log4j.jdbc.JDBCAppender log4j.appender.JDBC.URL=jdbc:odbc:pinjyothi log4j.appender.JDBC.User=pinjyothi log4j.appender.JDBC.Password=jyothi log4j.appender.JDBC.BufferSize=1 -- I

Re: JDBCAppender problem

2002-06-12 Thread Steve . Lewis
Modify JDBCAppender and print out the driver name. Check to see what it's initializing as. Also, make sure the driver is in your classpath. Steve

RE: JDBCAppender problem

2002-06-12 Thread Jyothi Panduranga
Thanks for your reply. I got myself mixed up with the Kevin Steppe's JDBCAppender with the Thomas Fenner's configuration file. But still I cannot find anywhere about the parameter name for the SQL statement in the configuration file. Can I specify SQL statement in the configuration file? If

RE: JDBCAppender problem

2002-06-12 Thread Jyothi Panduranga
Does anybody have a example configuration file which has a sample parameters for Kevin Steppe's JDBCAppender? Jyothi -Original Message- From: Jyothi Panduranga Sent: Wednesday, June 12, 2002 10:59 AM To: Log4J Users List Subject: RE: JDBCAppender problem Thanks for your reply. I got

RE: JDBCAppender problem

2002-06-12 Thread Klein, Scott @ TW
have you tried 'Sql' as the parameter name? Getting into the statement get a little touchy with PatternSets and stuff - you may want to just extend it. Disclaimer: I have not used JDBCAppender From the Javadoc: The setSql(String sql) sets the SQL statement to be used for logging -- this

RE: JDBCAppender problem

2002-06-12 Thread Steve . Lewis
The parameters follow the JavaBean specification, so any parameter in JDBCAppender blah will follow setBlah, getBlah. Log4J can't find the setUsername(String u) method, for instance. St

Re: JDBCAppender problem

2002-06-12 Thread Jeffrey Winter
You can put the sql statement in the configuration file by doing something like this: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=database

RE: NTEventLogAppender.dll

2002-06-12 Thread Mittal, Manisha
I found the .dll. I got it from an older version .tar of log4J at your site. Thanks, Manisha- -Original Message- From: Colin MacDonald [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 12:03 PM To: Log4J Users List Subject: RE: NTEventLogAppender.dll Oh, my version just

Re: Re-read configuration file via configureAndWatch()

2002-06-12 Thread Bomb Diggy
There was a post a couple of months ago about being able to 'set' configureAndWatch() via the log4j.properties file. http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg04352.html Is this feature planned for future releases of Log4J? I hacked on the source a little and managed to get

RE: Re-read configuration file via configureAndWatch()

2002-06-12 Thread Scott Miller
Rather than hacking Log4J's source, here's how I accomplished it : 1. Create a custom LoggerConfigurator, MyConfigurator, extending PropertyConfigurator 2. Set the properties file to use this configurator. ... public class MyLoggerConfigurator extends PropertyConfigurator { private

Re[2]: Re-read configuration file via configureAndWatch()

2002-06-12 Thread Jacob Kjome
Hello Scott, How exactly would that work? Doesn't configureAndWatch() require a full file path? url.getFile() only returns the filename part of the URL. How does configureAndWatch() know where to find this file? Am I missing something? Jake Wednesday, June 12, 2002, 3:44:48 PM, you wrote:

Layout problem with JDBCAppender

2002-06-12 Thread Jyothi Panduranga
Hi, I am trying to run the example program 'Sort' using the attached configuration file. I trying to log the msgs to SQL database. I keep getting this following error. Has anybody experienced the same problem before? Can somebody give me pointers and suggest me a good documentation about

RE: Layout problem with JDBCAppender

2002-06-12 Thread Mittal, Manisha
I have never used before, but I found this in log4J Documentation. SQL statement, eg: insert into LogTable (Thread, Class, Message) values (%t, %c, %m) Be careful of quotes in your messages! Try replacing '%m' by %m. May be this will help. Manisha- -Original Message- From: Jyothi

RE: Re-read configuration file via configureAndWatch()

2002-06-12 Thread Mark Womack
For version 1.3, we are looking to deprecate the configureAndWatch() method and replace it with a more complete implementation, ConfigWatchdog. Tne implementation will not be tied to a specific configurator, but will support any configurator. There has been a review of the design on the dev

duplicate debugging output?

2002-06-12 Thread Jacob Kjome
Hi, I am getting duplicated debugging output for every single debug statement. I've seen a few other messages like this on the list, but either a solution was not given or I just didn't understand the solutions provided. Below is some sample output. This happens in both the