Could this be done implementing a custom appender/layout instead of extending Logger? (I'm trying hard as I can to avoid dealing with the source code of the app itself, since it isn't mine ;)
On 6/28/05, Lenin David Lozano Argel <[EMAIL PROTECTED]> wrote: > You have to implement your own logger and override the log(Priority, Object, > Throwable) method to parse the exception as you want. > > > > -----Mensaje original----- > De: Javier Gonzalez [mailto:[EMAIL PROTECTED] > Enviado el: Martes, 28 de Junio de 2005 03:31 p.m. > Para: [email protected] > Asunto: Logging the exception message but not the stack trace? > > > Is there a way to configure an appender to log the Exception message > but not the stack trace? To get something like: > > ERROR: javax.xml.rpc.JAXRPCException: java.net.MalformedURLException > > instead of: > > ERROR: javax.xml.rpc.JAXRPCException: java.net.MalformedURLException > at org.apache.axis.client.Call.setTargetEndpointAddress(Call.java:803) > at > com.atichile.commons.sms.SMSGatewayInterface.injectMessage(SMSGatewayInterface.java:97) > at > com.atichile.commons.sms.GatewaySMSSender.send(GatewaySMSSender.java:199) > at > com.atichile.commons.sms.GatewaySMSSender.send(GatewaySMSSender.java:223) > at > com.atichile.commons.demo.thread.DemoSMSProcessingThread.run(DemoSMSProcessingThread.java:76) > at java.lang.Thread.run(Thread.java:534) > (etc, etc, etc) > > Changing the source code from: > > catch(Exception e){ > logger.error("My error message",e); > } > > to: > > catch(Exception e){ > logger.error("My error message: "+e.getMessage()); > } > > is not an option :) > > any insight is welcome. > > -- > Javier Gonzalez Nicolini > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > La información adjunta es exclusiva para la persona a la cual se dirige este > mensaje, la cual puede contener información confidencial y/o material > privilegiado. Cualquier revisión, retransmisión, diseminación o uso del > mismo, así como cualquier acción que se tome respecto a la información > contenida, por personas o entidades diferente al propósito original de las > misma, es ilegal. Si usted recibe este mensaje por error, favor notifíqueme y > elimine ese material. > Este mensaje y sus anexos han sido sometidos a programas antivirus, por lo > cual consideramos se encuentra libre de virus o cualquier anomalía que pueda > afectar a terceros, sin embargo, el destinatario debe verificar con sus > propias protecciones que ellos no están afectados por virus u otros defectos, > en cuyo caso, el remitente no asume responsabilidad alguna por el recibo, > transmisión y uso de este material. > > The information transmitted here within is sensitive information intended > only for use of the individual or entity to which it is addresses. If the > reader of this message is not the intended recipient, you are hereby notified > that any review, retransmission, dissemination, distribution, copying or > other use of, or taking of any action in reliance upon, this information is > strictly prohibited. IF you have received this communication in error, please > contact the sender and delete the material from your computer. > Viruses: The message and its attachments are considered to be free of any > virus or other defect. Nevertheless, we advise the recipient to verify that > the material is virus free. Suramericana is not responsible for any loss or > damages arising out of the transmission, use or handling of this matrial. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Javier Gonzalez Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
