Browse Source

Make Thresh logging compatable with Storm 1.1.1

The newest version of Storm (1.1.1) looks for a log4j2 file
instead of a logback file

Change-Id: I31b1739e1e42b91c31e1cdd43b539da2b030933a
tags/2.3.0^2
Monasca CI 1 year ago
parent
commit
e8001abfac
2 changed files with 26 additions and 26 deletions
  1. 26
    0
      thresh/src/main/resources/log4j2.xml
  2. 0
    26
      thresh/src/main/resources/logback.xml

+ 26
- 0
thresh/src/main/resources/log4j2.xml View File

@@ -0,0 +1,26 @@
1
+<configuration monitorInterval="60" shutdownHook="disable">
2
+  <properties>
3
+    <property name="pattern">%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</property>
4
+  </properties>
5
+
6
+  <appenders>
7
+    <Console name="console" target="SYSTEM_OUT">
8
+      <PatternLayout>
9
+        <pattern>${pattern}</pattern>
10
+      </PatternLayout>
11
+    </Console>
12
+
13
+    <File name="FILE" fileName="${LOGDIR:-/tmp}/monasca-thresh.log">
14
+      <PatternLayout>
15
+        <pattern>${pattern}</pattern>
16
+      </PatternLayout>
17
+    </File>
18
+  </appenders>
19
+
20
+  <loggers>
21
+    <root level="info">
22
+      <appender-ref ref="console"/>
23
+      <appender-ref ref="FILE"/>
24
+    </root>
25
+  </loggers>
26
+</configuration>

+ 0
- 26
thresh/src/main/resources/logback.xml View File

@@ -1,26 +0,0 @@
1
-<configuration scan="true" scanPeriod="30 seconds">
2
-
3
-    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
4
-        <!-- encoders are assigned the type
5
-             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
6
-        <encoder>
7
-            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
8
-        </encoder>
9
-    </appender>
10
-
11
-    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
12
-        <file>${LOGDIR:-/tmp}/monasca-thresh.log</file>
13
-
14
-        <encoder>
15
-            <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
16
-        </encoder>
17
-    </appender>
18
-
19
-
20
-    <logger name="monasca" level = "info"/>
21
-
22
-    <root level="info">
23
-        <appender-ref ref="STDOUT" />
24
-        <appender-ref ref="FILE" />
25
-    </root>
26
-</configuration>

Loading…
Cancel
Save