What config will need to send mail using log4j.property settings in logstash?

currently logstash create plain.log, how can send mail using log4j2.property file.
any idea?

Configure an SMTPAppender.

i have used this SMTPAppender config but i am not getting any email and error on logstash

log4j.rootLogger=email
log4j.appender.email=org.apache.log4j.net.SMTPAppender
log4j.appender.email.BufferSize=10
log4j.appender.email.SMTPHost=smtp.gmail.com
log4j.appender.email.SMTPPort=587
log4j.appender.email.SMTPUsername=abc@gmail.com
log4j.appender.email.SMTPPassword=*****************
log4j.appender.email.SMTPProtocol=smtps
log4j.appender.email.From=abc@gmail.com
log4j.appender.email.To=abc@abc.com
log4j.appender.email.Subject=show error
log4j.appender.email.threshold=INFO
log4j.appender.mail.layout=org.apache.log4j.PatternLayout
log4j.appender.email.layout.ConversionPattern=[%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]} %m%n

is there any config which i need to add?

any useful update ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.