码迷,mamicode.com
首页 > 其他好文 > 详细

storm local logback

时间:2019-01-29 14:55:20      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:console   mep   shu   class   cap   add   edr   pat   evel   

<configuration>
    <property name="pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} %t [%p] %msg%n"/>
  <property name="LOG_HOME" value="C:/Users/lt32806/logs" />


  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>${pattern}</pattern>
    </encoder>
  </appender>

  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${LOG_HOME}/tempest.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <!-- daily rollover -->
      <fileNamePattern>${LOG_HOME}/tempest-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
      <maxHistory>10</maxHistory>
      <maxFileSize>100MB</maxFileSize>
      <totalSizeCap>5000MB</totalSizeCap>
    </rollingPolicy>
    <encoder>
      <pattern>${pattern}</pattern>
    </encoder>
  </appender>

  <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${LOG_HOME}/tempest-METRICS.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <!-- daily rollover -->
      <fileNamePattern>${LOG_HOME}/tempest-METRICS-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
      <maxHistory>10</maxHistory>
      <maxFileSize>100MB</maxFileSize>
      <totalSizeCap>500MB</totalSizeCap>
    </rollingPolicy>
    <encoder>
      <pattern>${pattern}</pattern>
    </encoder>
  </appender>

  <appender name="daemon" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${LOG_HOME}/tempest-daemon.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <!-- daily rollover -->
      <fileNamePattern>${LOG_HOME}/tempest-daemon-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
      <maxHistory>10</maxHistory>
      <maxFileSize>100MB</maxFileSize>
      <totalSizeCap>500MB</totalSizeCap>
    </rollingPolicy>
    <encoder>
      <pattern>${pattern}</pattern>
    </encoder>
  </appender>



  <root level="info">
    <appender-ref ref="STDOUT"/>
    <appender-ref ref="FILE"/>
  </root>
  <logger name="org.apache.storm.metric.LoggingMetricsConsumer" level="info" additivity="false">
    <appender-ref ref="METRICS"/>
  </logger>
  <logger name="org.apache.storm.daemon" level="info" additivity="false">
    <appender-ref ref="daemon"/>
  </logger>
  <logger name="org.mongo">
    <level value="warn"/>
  </logger>
  <shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/>
</configuration>

 

storm local logback

标签:console   mep   shu   class   cap   add   edr   pat   evel   

原文地址:https://www.cnblogs.com/tonggc1668/p/10333856.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!