org.springframework.boot.logging.logback.smtp-appender.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> <included> <appender name="SMTP" class="ch.qos.logback.classic.net.SMTPAppenderCustom"> <sessionViaJNDI>${SMTP_SESSION_VIA_JNDI:-false}</sessionViaJNDI> <jndiLocation>${SMTP_JNDI_LOCATION:-java:comp/env/mail/Session}</jndiLocation> <smtpHost>${SMTP_HOST:-localhost}</smtpHost> <smtpPort>${SMTP_PORT:-25}</smtpPort> <username>${SMTP_USERNAME}</username> <password>${SMTP_PASSWORD}</password> <charsetEncoding>${SMTP_CHARSET_ENCODING:-${file.encoding:-UTF-8}}</charsetEncoding> <localhost>${SMTP_LOCALHOST:-${user.name}}</localhost> <STARTTLS>${SMTP_STARTTLS:-false}</STARTTLS> <SSL>${SMTP_SSL:-false}</SSL> <asynchronousSending>${SMTP_ASYNCHRONOUS_SENDING:-true}</asynchronousSending> <delayBetweenStatusMessages>${SMTP_DELAY_BETWEEN_STATUS_MESSAGES:-300000}</delayBetweenStatusMessages> <to>${SMTP_TO}</to> <from>${SMTP_FROM}</from> <subject>${SMTP_SUBJECT:-[%level] %logger{20}}</subject> <layout class="ch.qos.logback.classic.html.HTMLLayout"> <pattern>%date{yyyy-MM-dd'T'HH:mm:ss.SSSZZ}%logger%message</pattern> </layout> <evaluator class="ch.qos.logback.access.boolex.OnIntervalEvaluator"> <interval>${LOG_INTERVAL:-300000}</interval> </evaluator> <!-- <filter class="ch.qos.logback.classic.filter.LevelFilter"> --> <!-- <level>WARN</level> --> <!-- <onMatch>ACCEPT</onMatch> --> <!-- <onMismatch>NEUTRAL</onMismatch> --> <!-- </filter> --> <!-- <filter class="ch.qos.logback.classic.filter.LevelFilter"> --> <!-- <level>ERROR</level> --> <!-- <onMatch>ACCEPT</onMatch> --> <!-- <onMismatch>DENY</onMismatch> --> <!-- </filter> --> </appender> </included>