SHARE
TWEET

Untitled

a guest Aug 25th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <configuration debug="true">
  2.  
  3.     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
  4.         <layout class="ch.qos.logback.classic.PatternLayout">
  5.             <Pattern>
  6.                 %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
  7.             </Pattern>
  8.         </layout>
  9.     </appender>
  10.  
  11.     <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
  12.         <smtpHost>smtp.mailgun.org</smtpHost>
  13.         <smtpPort>25</smtpPort>
  14.         <username>123</username>
  15.         <password>123</password>
  16.         <to>TO_EMAIL</to>
  17.         <to>RO_ANOTHER_EMAIL</to>
  18.         <from>FROM_EMAIL</from>
  19.         <subject>TESTING: %logger{20} - %m</subject>
  20.  
  21.         <layout class="ch.qos.logback.classic.html.HTMLLayout"/>
  22.  
  23.         <!-- for testing , comment in production, default 256 -->
  24.         <cyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTracker">
  25.             <!-- Send just one log entry per email, ready for a lot of emails if you put one. -->
  26.             <bufferSize>1</bufferSize>
  27.         </cyclicBufferTracker>
  28.  
  29.         <!-- for testing , comment in production, default asynchronousSending = true -->
  30.         <asynchronousSending>false</asynchronousSending>
  31.  
  32.     </appender>
  33.  
  34.     <logger name="com.mkyong" level="error" additivity="false">
  35.         <appender-ref ref="EMAIL"/>
  36.     </logger>
  37.  
  38.     <root level="error">
  39.         <appender-ref ref="CONSOLE"/>
  40.     </root>
  41.  
  42. </configuration>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top