Email log4j wrong message on notice

  Abstract: The log4j wrong message Email notification 


  My configuration file is 
  Log4j.rootLogger = DEBUG 
  # Sent to the e-mail log 
  Log4j.logger.MAIL = DEBUG, FaMAIL 
  Log4j.appender.FaMAIL = org.apache.log4j.net.SMTPAppender 
  Log4j.appender.FaMAIL.Threshold = DEBUG 
  Log4j.appender.FaMAIL.BufferSize = 1 
  Log4j.appender.MAIL.From = test@163.com 
  Log4j.appender.FaMAIL.SMTPHost = mail.163.com 
  Log4j.appender.FaMAIL.Subject = Log4J Message 
  Log4j.appender.FaMAIL.To = test@163.com 
  Log4j.appender.FaMAIL.layout = org.apache.log4j.PatternLayout 
  Log4j.appender.FaMAIL.layout.ConversionPattern =% d [framework] - c% -%-4r [% t]%-5p% c% x -% m% n 

  Why did it fail to receive mail Thank you please tell me 

  In the process, 
  Logger FaMAIL = Logger.getLogger ( "FaMAIL"); 
  FaMAIL.debug ( "wrong message"); 




  Log4j.appender.FaMAIL.SMTPHost = mail.163.com 
  Wrong, it is smtp.163.com 
  If you check is not there are other configuration parameters are wrong, if you are Internet through a proxy, such connections less than 163 mail server! 



  No abnormality dished out? 


  ↑ Back 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags:

Releated Java Articles

Comments

Leave a Reply