storm local logback

Posted tonggc1668

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了storm local logback相关的知识,希望对你有一定的参考价值。

<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的主要内容,如果未能解决你的问题,请参考以下文章

二:Storm的配置项说明

项目存在多个logback配置

Storm一torm安装部署

Storm Nimbus默认的任务调度策略

linux单机部署storm

storm笔记