LogFactor5 files

2002-07-31 Thread Grübel, Nicole
Hi! What kind of files can I load with LogFactor5? I tried a normal text-based log-file and an xml-formated log-file (the one I can open with Chainsaw, for example) and got in both cases the following error-message: Error - invalid log file format. Please see the documentation on how to load

Problem in MDC

2002-07-31 Thread Sundararaman, Anand
Hi, I have a problem which needs urgent attention. I am using MDC.getContext() which is supposed to return a Hashtable , but returns me a null. I am not able to find how this object is to be used. If someone can give me a example program using MDC it will be very useful. The method i am

RE: servlet logging

2002-07-31 Thread Shapira, Yoav
Hi, Wow, a new log *file* for every request? Do you really want to be looking at that many log files? Anyways, here's are a couple of ideas: - Create the log file programmatically each time: This is in your service() method, or doGet() or doPost(), whichever is relevant to your design. //

Re: LogFactor5 files

2002-07-31 Thread Craig Smith
You need to produce a specifically formatted file. See the documentation at http://jakarta.apache.org/log4j/docs/lf5/readingfiles.html which describes how to do that. This brings up a point. Is there a reason why LogFactor5 can not use XMLLayout generated files? I like some features of

How to use Chainsaw for different clients?

2002-07-31 Thread Grübel, Nicole
I basically can use now Chainsaw and LogFactor5. In Chainsaw you set a host and a port ... and so far I used localhost and the default-port 4445. Is it possible to use the IP of a client instead of localhost, so that I can see the logging of this very client only in Chainsaw? And is there another

RE: How to use Chainsaw for different clients?

2002-07-31 Thread EPugh
There was some work done on LF5 to allow you to pick what IP address to receive events from.. Look in the email archives, you can find more info, and maybe the beta.. I think this is up for the next version of log4j? Eric -Original Message- From: Grübel, Nicole [mailto:[EMAIL

RE: log4j config parameters

2002-07-31 Thread Shapira, Yoav
Hi, String filePath = c:\\temp\\test1.log; Layout myLayout = ... Appender logFileAppender = new FileAppender(myLayout, filePath); (you would then do logFileAppender.setLayout() etc.) Or if the appender exists already: Logger rootLogger = Logger.getRootLogger(); Appender app =

RE: Memory Leaks in Log4j

2002-07-31 Thread Shapira, Yoav
Hi, Ceki has already answered, and I myself haven't heard of nor experienced memory leaks. We have had large, long-lived servers use log4j with many Loggers and several appenders, never had any problems. However, I'm curious about something else in your question, and this may make this thread

RE: log4j in tomcat

2002-07-31 Thread Koes, Derrick
The long-winded answer was fine and helpful. That's what I wanted to know, but there is a bit more. Actually, I haven't modified either of the bat files you mention. I simply followed option 1 in the log4j short manual for logging in tomcat 4.x. This follows: Default Initialization under

RE: Problem in MDC

2002-07-31 Thread Mark Womack
The MDC will only return a hash table if a key has been placed in the MDC. If no keys have been placed in the MDC, then there is no hash table. You can look at the MDC code to verify this. -Mark -Original Message- From: Sundararaman, Anand [mailto:[EMAIL PROTECTED]] Sent: Wednesday,

Can we get the number of hits to a servlet using log4j

2002-07-31 Thread Vullanki, Srividya
Hi, Is there any way we can find the number of hits to the servlet using log4j Thanks Srividya -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

RE: How to use Chainsaw for different clients?

2002-07-31 Thread Mark Womack
I cannot speak for LF5, but for Chainsaw... On your event source machine you could use SocketHubAppender instead of SocketAppender. Then, with some modifications I have made to the current Chainsaw, you could then connect Chainsaw to the set of machines you want to look at events for. It

RE: Can we get the number of hits to a servlet using log4j

2002-07-31 Thread Shapira, Yoav
Hi, In the service() method: logger.info(MyServlet: I'm hit! Help!); Or just do it the normal way, using the server's access file. You don't want to go down the path of using log4j to record access. Your web server should have ample provisions for this task. Yoav Shapira Millennium

Re: Can we get the number of hits to a servlet using log4j

2002-07-31 Thread Heinrich Götzger
On Wed, 31 Jul 2002, Vullanki, Srividya wrote: Hi, Is there any way we can find the number of hits to the servlet using log4j In 'jakarta-log4j-1.2.5/examples' are two files: MyPatternLayout.java MyPatternParser.java They show an example on how to add a internal counter which is triggered

FW: log4j in tomcat

2002-07-31 Thread Koes, Derrick
-Original Message- From: Koes, Derrick Sent: Wednesday, July 31, 2002 12:13 PM To: 'Tomcat Users List' Cc: '[EMAIL PROTECTED]'; Courtney, Brian; Monnelly, Susan; Chamarthi, Harish Subject: RE: log4j in tomcat The long-winded answer was fine and helpful. That's what I wanted to know,

RollingFileAppender disk full handling

2002-07-31 Thread Colin MacDonald
Hi all! In my application, I need to know if log4j failed to write a log message. I'm using RollingFileAppender, and from looking at the source, it catches exceptions and just writes to console. I'm writing transaction audit logs, so if I can't write to the log (disk full, or whatever) I want

NDC remove and servlets

2002-07-31 Thread Bill Sorensen
I'm trying to use NDCs with servlets, and want to confirm that I'm doing so correctly. Basically, I'm doing the following in doPost: if (user logs in OK) { NDC.push(currentUser.getCompanyId()); try { ... } finally { // log user out NDC.pop(); } NDC.remove();

Re: logger factory question

2002-07-31 Thread N. D.
Hi Does anybody have any documentation pointers to the alternative to using LoggerFactory? Will buying the complete log4J manual help? Can I find some explanation as to why the use of LoggerFactory discouraged? The mail archives seem to suggest use of LoggerRepository, but there wasn't any

Re: RollingFileAppender disk full handling

2002-07-31 Thread Kevin Steppe
Colin, log4j does not throw exceptions. However, the RollingFileAppender -should- make calls to the errorHandler. Implement your own ErrorHandler and you should be able to get those notifications. Kevin Colin MacDonald wrote: Hi all! In my application, I need to know if log4j failed

Re: logger factory question

2002-07-31 Thread Ceki Gülcü
This question was raised on this list numerous times. I suggest reading the following thread: http://marc.theaimsgroup.com/?l=log4j-devm=102274371508502w=2 Chapters 8, 9 and Q 11.11 of the complete manual cover the question of sub-classing. Nevertheless, I think that they don't deal with the