RE: Suggestions... (modifying logging messages on the fly)

2005-03-01 Thread Larry Young
Davide, That's exactly what I did. I called mine NewPatternLayout (imaginative, huh!). It simply a wrapper around the PatternLayout that tells the appender that it will handle Throwable, and then doesn't. --- regards --- Larry At 03:38 AM 3/1/05, you wrote: > Have you tried "%.80m" or

RE: Suggestions... (modifying logging messages on the fly)

2005-03-01 Thread DE BENEDICTIS DAVIDE
import org.apache.log4j.spi.*; Finally I solved with just this trivial SMSLayout. For me it's enough. Bye Davide import org.apache.log4j.*; import java.text.SimpleDateFormat; import java.util.GregorianCalendar; /** * */ public class SMSLayout extends Layout { /** * two chars less, jus

RE: Suggestions... (modifying logging messages on the fly)

2005-03-01 Thread DE BENEDICTIS DAVIDE
> Have you tried "%.80m" or similar? That should specify a maximum > message length of 80 characters. If the message is longer it will be > truncated from the beginning. Yes I tried but the "truncated from the beginning" forbideen me from generating an meaningfull message within 160 chars. BTW

Re: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread Curt Arnold
On Feb 28, 2005, at 10:26 AM, James Stauffer wrote: DE BENEDICTIS DAVIDE <[EMAIL PROTECTED]> wrote: I'm looking for a method to modifying (cutting) the outcoming logging message on the fly. In this way I could update only the log4j conf files without touching my working app. Something like a %m wi

Re: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread James Stauffer
DE BENEDICTIS DAVIDE <[EMAIL PROTECTED]> wrote: > > > I think that I heard that 1.3 allows you to choose the number > > of trace lines or that someone was doing an enhancement for > > that. Check the list archives. > > Yes but for the moment I have to stick with a production proven version. > Ev

RE: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread DE BENEDICTIS DAVIDE
> I think that I heard that 1.3 allows you to choose the number > of trace lines or that someone was doing an enhancement for > that. Check the list archives. Yes but for the moment I have to stick with a production proven version. Everything is already deployed. > Another option is to not s

Re: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread James Stauffer
DE BENEDICTIS DAVIDE <[EMAIL PROTECTED]> wrote: > > > When I email my SMS email address it automatically cuts off > > anything over 160 characters so maybe you don't need to do > > anything besides making sure that the order of info is correct. > > I tried but my sms server splits the email in va

RE: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread DE BENEDICTIS DAVIDE
> When I email my SMS email address it automatically cuts off > anything over 160 characters so maybe you don't need to do > anything besides making sure that the order of info is correct. I tried but my sms server splits the email in various sms so for a typical print stack trace you get six

Re: Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread James Stauffer
DE BENEDICTIS DAVIDE <[EMAIL PROTECTED]> wrote: > > I'm looking for a method to modifying (cutting) the outcoming logging > message on the fly. In this way I could update only the log4j conf files > without touching my working app. > Something like a %m with the ability to specify a maximum number

Suggestions... (modifying logging messages on the fly)

2005-02-28 Thread DE BENEDICTIS DAVIDE
Hi, I have a working application that uses an SMTP appender. This appendere is used for administration purposes. Only for certain fatal exceptions, a mail is sent toward the support team. Now, for the same events, I have to send short messages (SMS) using another SMTP appender (we have a mail serv