storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [28/50] storm git commit: use separate logback config for workers
Date Thu, 13 Nov 2014 19:37:23 GMT
use separate logback config for workers


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/af61cca7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/af61cca7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/af61cca7

Branch: refs/heads/master
Commit: af61cca75c6215d5a0db2d6fb338deca03e55095
Parents: b19fdbb
Author: Derek Dagit <derekd@yahoo-inc.com>
Authored: Wed Sep 3 10:05:25 2014 -0500
Committer: Derek Dagit <derekd@yahoo-inc.com>
Committed: Wed Sep 3 10:05:25 2014 -0500

----------------------------------------------------------------------
 logback/worker.xml                              | 41 ++++++++++++++++++++
 .../clj/backtype/storm/daemon/supervisor.clj    |  2 +-
 .../test/clj/backtype/storm/supervisor_test.clj |  4 +-
 3 files changed, 44 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/af61cca7/logback/worker.xml
----------------------------------------------------------------------
diff --git a/logback/worker.xml b/logback/worker.xml
new file mode 100644
index 0000000..3d9009e
--- /dev/null
+++ b/logback/worker.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<configuration scan="true" scanPeriod="60 seconds">
+  <appender name="A1" class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>${storm.log.dir}/${logfile.name}</file>
+    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+      <fileNamePattern>${storm.log.dir}/${logfile.name}.%i</fileNamePattern>
+      <minIndex>1</minIndex>
+      <maxIndex>9</maxIndex>
+    </rollingPolicy>
+
+    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+      <maxFileSize>100MB</maxFileSize>
+    </triggeringPolicy>
+
+    <encoder>
+      <pattern>%d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="INFO">
+    <appender-ref ref="A1"/>
+  </root>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/storm/blob/af61cca7/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 7b242e5..1fe5b2e 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -638,7 +638,7 @@
                      (str "-Dlogfile.name=" logfilename)
                      (str "-Dstorm.home=" storm-home)
                      (str "-Dstorm.log.dir=" storm-log-dir)
-                     (str "-Dlogback.configurationFile=" storm-home "/logback/cluster.xml")
+                     (str "-Dlogback.configurationFile=" storm-home "/logback/worker.xml")
                      (str "-Dstorm.id=" storm-id)
                      (str "-Dworker.id=" worker-id)
                      (str "-Dworker.port=" port)

http://git-wip-us.apache.org/repos/asf/storm/blob/af61cca7/storm-core/test/clj/backtype/storm/supervisor_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/supervisor_test.clj b/storm-core/test/clj/backtype/storm/supervisor_test.clj
index c94688f..4261b4d 100644
--- a/storm-core/test/clj/backtype/storm/supervisor_test.clj
+++ b/storm-core/test/clj/backtype/storm/supervisor_test.clj
@@ -262,7 +262,7 @@
                                 (str "-Dlogfile.name=" mock-storm-id "-worker-" mock-port
".log")
                                 "-Dstorm.home="
                                 "-Dstorm.log.dir=/logs"
-                                "-Dlogback.configurationFile=/logback/cluster.xml"
+                                "-Dlogback.configurationFile=/logback/worker.xml"
                                 (str "-Dstorm.id=" mock-storm-id)
                                 (str "-Dworker.id=" mock-worker-id)
                                 (str "-Dworker.port=" mock-port)
@@ -380,7 +380,7 @@
                                 " '-Dlogfile.name=" mock-storm-id "-worker-" mock-port ".log'"
                                 " '-Dstorm.home='"
                                 " '-Dstorm.log.dir=/logs'"
-                                " '-Dlogback.configurationFile=/logback/cluster.xml'"
+                                " '-Dlogback.configurationFile=/logback/worker.xml'"
                                 " '-Dstorm.id=" mock-storm-id "'"
                                 " '-Dworker.id=" mock-worker-id "'"
                                 " '-Dworker.port=" mock-port "'"


Mime
View raw message