RE: reusability and applet dilemma

2006-02-21 Thread Keith Hatton
A couple of alternatives spring to mind. 1. If you're able and prepared to use a signed applet, the security issues may go away. 2. You could handle Logger initialisation in a static block, catch exceptions and provide a dummy implementation of Logger so that the remainder of your code doesn't th

RE: Logging chained Exceptions

2005-09-06 Thread Keith Hatton
Chained exceptions were only introduced in JDK 1.4, so if there is a requirement to run on JDK 1.3 (which we do) that might explain it. Keith -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: 02 September 2005 18:00 To: Log4J Users List Subject: Logging chained Exc

RE: Wish for CVS version: if debug enabled()

2005-01-20 Thread Keith Hatton
>> In the absence of var-args (recently introduced in JDK 1.5), this approach >> would require us to add many new methods, taking 3, 4, 5, 6, etc. arguments. Surely you could wrap the java.text.MessageFormat API? It uses {0}, {1}, {2}, ... and an Object[] - this can be used for any number of ar

RE: Example policies for log levels?

2004-12-07 Thread Keith Hatton
Just my $0.02. I agree with your use of FATAL, ERROR and DEBUG. I also use ERROR in some cases when logging something that has gone wrong, even though the result is predictable. I use WARN for things that should not cause the application to fail, but are not the "expected" use case, and may cau

RE: Another problem: Chainsaw + Log4j - java.io.NotSerializableException: org.apache.l og4j.Logger

2004-12-06 Thread Keith Hatton
Make all references to Logger objects either static, or transient. That way there should be no attempt to serialize them. Hope this helps Keith -Original Message- From: Currimbhoy Shahyan [mailto:[EMAIL PROTECTED] Sent: 02 December 2004 15:34 To: 'Log4J Users List' Subject: Another probl

RE: http requests for nonexistent *BeanInfo.classes?

2004-11-22 Thread Keith Hatton
y On Fri, 2004-11-19 at 02:21, Keith Hatton wrote: > java.beans.Introspector.setBeanInfoSearchPath(new String[0]); > > I forget whether this eliminates the BeanInfo requests completely, or just > reduces them. > > Hope this helps > Keith > > > -Original Message

RE: http requests for nonexistent *BeanInfo.classes?

2004-11-19 Thread Keith Hatton
java.beans.Introspector.setBeanInfoSearchPath(new String[0]); I forget whether this eliminates the BeanInfo requests completely, or just reduces them. Hope this helps Keith -Original Message- From: Jerry Seutter [mailto:[EMAIL PROTECTED] Sent: 16 November 2004 21:51 To: log4j-user Subj

RE: recursive stack failure

2004-09-30 Thread Keith Hatton
Hi Michael, I haven't had any direct experience of the type you describe, but I have a couple of thoughts: 1. If you're using Java 1.4, you might be able to examine the stack trace programatically, and not call any logging in your toString() if you realise that you're already in a logging call

RE: Class loading issues using WLS 8.1?

2004-08-27 Thread Keith Hatton
In the Weblogic console (or equivalently, somewhere in the weblogic.xml descriptor) there is a "Prefer Web-Inf Classes" option, which I believe reverses (should that be "standardizes"?) the classloader preference. Maybe this would help? Keith -Original Message- From: Jacob Kjome [mailt

RE: using log4j to one logging file from more than one process

2004-07-26 Thread Keith Hatton
You might also consider using system-level logging (e.g. with NTEventLogAppender or SyslogAppender, depending on the platform) or a SocketAppender from each application to a listener in a fourth JVM on the box. Keith -Original Message- From: Dennis Cook [mailto:[EMAIL PROTECTED] Sent:

RE: Which Way of "Extending" Gives Fastest Performance

2004-04-22 Thread Keith Hatton
>> I believe Ceki's assertion that wrapping is the best and safest thing to do from a software engineering standpoint. But, my users and my boss care more about how fast the application performs. << Do no logging at all. That will be fastest. Of course, it may not be right, but you've just sai

RE: logging inside EJB

2004-04-20 Thread Keith Hatton
Ah! I knew there was a reason why I made my Loggers normal instance variables, I think this was probably it from when I was playing around with WebSphere. Just declare your logger as private transient Logger logger = Logger.getLogger(...); and remember to reinitialise it in ejbActivate(). It

RE: Problems with my classpath?

2004-03-29 Thread Keith Hatton
It's consistent with the general rule that the JVM raises a subclass of Error when you shouldn't normally attempt to recover from the failure condition. There was nothing directly wrong with your request for class X; the error is that class X requires class Y, which couldn't be found (and is pre

RE: log4j output to CORBA via socket appender ?

2004-03-04 Thread Keith Hatton
Hi Juergen, I'm not sure that you would really use the SocketAppender, unless you were planning to send IIOP messages down the socket yourself, which sounds like a lot of work Maybe you could write an IDL interface and use the stub in an Appender class, so that messages are sent to a CORBA se

RE: Catching Exceptions through Log4j

2004-02-20 Thread Keith Hatton
Hi Ajay, A real hack would be to redirect System.err to a file, then all calls to printStackTrace() will magically go to that file. Use System.setErr(...) to do this. Keith -Original Message- From: Ajay [mailto:[EMAIL PROTECTED] Sent: 20 February 2004 04:06 To: Log4J Users List Subject

RE: Question on Log4J Reliability

2004-01-16 Thread Keith Hatton
>> I would log to the database. In the same transaction as the operation you want to log about. << Beware ... this approach will never record any failed transactions, because the logging will be rolled back along with everything else! It really depends on what you really mean by 'reliability'. I