我已经为 smtp appender 配置了以下属性。相同的配置在本地运行良好,但在 AWS 上出现错误
log4j.appender.email=org.apache.log4j.net.SMTPAppender
log4j.appender.email.BufferSize=20
log4j.appender.email.SMTPHost=email-smtp.us-east-1.amazonaws.com
log4j.appender.email.SMTPUsername=<username>
log4j.appender.email.SMTPPassword=<password>
log4j.appender.email.SMTPPort=587
log4j.appender.email.From=<from@email>
log4j.appender.email.To=<to@email>
log4j.appender.email.Subject=<Subjec>
log4j.appender.email.layout=org.apache.log4j.PatternLayout
log4j.appender.email.layout.ConversionPattern=%d %-5p [%t] (%c{1}:%L) - %m%n
log4j.appender.email.SMTPDebug=true
log4j.appender.email.EnableSsl=true
log4j.appender.email.smtp.starttls.enable=true
log4j.appender.email.smtp.auth=true
log4j.appender.email.TLS=true