Files are attached. Just change the way of getting SMTP.  

And log4j.properties

log4j.appender.A3=org.pernica.util.Log4jMailAppender
log4j.appender.A3.from=automat@egap.cz
log4j.appender.A3.to=jan.pernik@volny.cz
log4j.appender.A3.subject=Zpráva serveru o FAXER
log4j.appender.A3.location=http://hefaistos:8080/faxer
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.threshold=ERROR

                            
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.A3.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

 
Regards

Jan

utpal wrote:
I m not getting you... can you give me an example ?

Thanks,
Utpal

On Thu, 2005-07-07 at 17:30, Jan Pernica wrote:

  
we have developed such an appender :-) I will change our 
log4j.properties to appache one :-)


utpal wrote:

    
Hi
I am using web based application. I am using log4j.properties file as :

log4j.rootCategory=debug,R,EMAIL
                                                                                                                                         
log4j.appender.EMAIL=org.apache.log4j.net.CSMTPAppender
log4j.appender.EMAIL.BufferSize=1000
log4j.appender.EMAIL.SMTPHost=dns.extenprise.net
log4j.appender.EMAIL.From=shasane_utpal@extenprise.net
log4j.appender.EMAIL.Subject=TrackException : %s
log4j.appender.EMAIL.To=shasane_utpal@extenprise.net
log4j.appender.EMAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.EMAIL.layout.ConversionPattern=%d [%c] %-5p %m%n
                                                                                                                                                           
log4j.appender.R=org.apache.log4j.FileAppender
log4j.appender.R.File=/usr/fileRepository/LogFiles/cstreamer444.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%d] [%c] [%-5p] - %m%n

Now whenever exception in any JSP or Java class is thrown I got email
which include 
these bunch of exceptions form JSPs and Java classes.

Can I set SMTP Appender to get each exception seperately from mail? or
Can I set it to get Exceptions
      
>from single JSP or Single Java class in a single mail?
    
This I need bcoz I am setting dynamic subject each time which append
class name (in which exception is generated) to subject.

Thanks,
Utpal

 

------------------------------------------------------------------------

Příchozí zpráva neobsahuje viry.
Zkontrolováno Antivirovým systémem AVG.
Verze: 7.0.323 / Virová báze: 267.8.10/43 - datum vydání: 6.7.2005
 

      

  

Příchozí zpráva neobsahuje viry. Zkontrolováno Antivirovým systémem AVG. Verze: 7.0.323 / Virová báze: 267.8.10/43 - datum vydání: 6.7.2005