summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonasca CI <aadams@hpe.com>2017-12-01 17:56:33 -0700
committerMonasca CI <aadams@hpe.com>2017-12-04 16:34:28 -0700
commite8001abfac3ad74ad976798240f5c27dde351531 (patch)
treeaba41a257734e5a9bcda842af4bf67a9f6593777
parent9e9f2caa44983ed27c3eaa1c71badc4df7a59b54 (diff)
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
Notes
Notes (review): Code-Review+1: Ryan Brandt <ryan.brandt@hpe.com> Code-Review+1: Joseph Davis <joseph.davis@suse.com> Code-Review+1: Amir Mofakhar <amofakhar@op5.com> Code-Review+1: Matthias Bandorf <Matthias.Bandorf@est.fujitsu.com> Code-Review+2: Witold Bedyk <witold.bedyk@est.fujitsu.com> Workflow+1: Witold Bedyk <witold.bedyk@est.fujitsu.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 10 Apr 2018 15:28:04 +0000 Reviewed-on: https://review.openstack.org/525296 Project: openstack/monasca-thresh Branch: refs/heads/master
-rw-r--r--thresh/src/main/resources/log4j2.xml26
-rw-r--r--thresh/src/main/resources/logback.xml26
2 files changed, 26 insertions, 26 deletions
diff --git a/thresh/src/main/resources/log4j2.xml b/thresh/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..2c096e2
--- /dev/null
+++ b/thresh/src/main/resources/log4j2.xml
@@ -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>
diff --git a/thresh/src/main/resources/logback.xml b/thresh/src/main/resources/logback.xml
deleted file mode 100644
index 509be9a..0000000
--- a/thresh/src/main/resources/logback.xml
+++ /dev/null
@@ -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>