File size: 4,075 Bytes
02c698e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<!--
In order to disable debug.log, comment-out the ASYNCDEBUGLOG
appender reference in the root level section below.
-->

<configuration scan="true">
    <jmxConfigurator />
  
    <!-- No shutdown hook; we run it ourselves in StorageService after shutdown -->
  
    <!-- SYSTEMLOG rolling file appender to system.log (INFO level) -->
  
    <appender name="SYSTEMLOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>INFO</level>
      </filter>
      <!--
        JanusGraph change: default log location update for packaging janusgraph.sh
      -->
      <file>${cassandra.logdir}/cassandra.log</file>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${cassandra.logdir}/cassandra.log.%i.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>20</maxIndex>
      </rollingPolicy>
      <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>20MB</maxFileSize>
      </triggeringPolicy>
      <encoder>
        <pattern>%-5level [%thread] %date{ISO8601} %F:%L - %msg%n</pattern>
      </encoder>
    </appender>
  
    <!-- DEBUGLOG rolling file appender to debug.log (all levels) -->
  
    <appender name="DEBUGLOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <file>${cassandra.logdir}/debug.log</file>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${cassandra.logdir}/debug.log.%i.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>20</maxIndex>
      </rollingPolicy>
      <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>20MB</maxFileSize>
      </triggeringPolicy>
      <encoder>
        <pattern>%-5level [%thread] %date{ISO8601} %F:%L - %msg%n</pattern>
      </encoder>
    </appender>
  
    <!-- ASYNCLOG assynchronous appender to debug.log (all levels) -->
  
    <appender name="ASYNCDEBUGLOG" class="ch.qos.logback.classic.AsyncAppender">
      <queueSize>1024</queueSize>
      <discardingThreshold>0</discardingThreshold>
      <includeCallerData>true</includeCallerData>
      <appender-ref ref="DEBUGLOG" />
    </appender>
  
    <!-- STDOUT console appender to stdout (INFO level) -->
  
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
      <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>INFO</level>
      </filter>
      <encoder>
        <pattern>%-5level [%thread] %date{ISO8601} %F:%L - %msg%n</pattern>
      </encoder>
    </appender>
  
    <!-- Uncomment bellow and corresponding appender-ref to activate logback metrics
    <appender name="LogbackMetrics" class="com.codahale.metrics.logback.InstrumentedAppender" />
     -->
  
    <root level="INFO">
      <appender-ref ref="SYSTEMLOG" />
      <appender-ref ref="STDOUT" />
      <appender-ref ref="ASYNCDEBUGLOG" /> <!-- Comment this line to disable debug.log -->
      <!--
      <appender-ref ref="LogbackMetrics" />
      -->
    </root>
  
    <logger name="org.apache.cassandra" level="DEBUG"/>
    <logger name="com.thinkaurelius.thrift" level="ERROR"/>
  </configuration>