You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by as...@apache.org on 2011/08/22 20:15:43 UTC
svn commit: r1160355 - in /incubator/whirr/trunk: bin/examples bin/whirr
cli/src/main/resources/log4j.xml conf/ conf/log4j-cli.xml
conf/log4j-example.xml core/log4j.xml examples/src/main/resources/log4j.xml
Author: asavu
Date: Mon Aug 22 18:15:43 2011
New Revision: 1160355
URL: http://svn.apache.org/viewvc?rev=1160355&view=rev
Log:
WHIRR-365. Too verbose command line interface logging
Added:
incubator/whirr/trunk/conf/
incubator/whirr/trunk/conf/log4j-cli.xml
incubator/whirr/trunk/conf/log4j-example.xml
- copied, changed from r1160343, incubator/whirr/trunk/examples/src/main/resources/log4j.xml
Removed:
incubator/whirr/trunk/cli/src/main/resources/log4j.xml
incubator/whirr/trunk/core/log4j.xml
incubator/whirr/trunk/examples/src/main/resources/log4j.xml
Modified:
incubator/whirr/trunk/bin/examples
incubator/whirr/trunk/bin/whirr
Modified: incubator/whirr/trunk/bin/examples
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/bin/examples?rev=1160355&r1=1160354&r2=1160355&view=diff
==============================================================================
--- incubator/whirr/trunk/bin/examples (original)
+++ incubator/whirr/trunk/bin/examples Mon Aug 22 18:15:43 2011
@@ -17,11 +17,12 @@
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
+opts="-Dlog4j.configuration=log4j-example.xml"
if [ -d "$bin/../examples/target/lib" ]; then
- classpath="$bin/..:$bin/../examples/target/lib/*:$bin/../examples/target/*"
+ classpath="$bin/../conf/:$bin/..:$bin/../examples/target/lib/*:$bin/../examples/target/*"
else
- classpath="$bin/..:$bin/../lib/*"
+ classpath="$bin/../conf/:$bin/..:$bin/../lib/*"
fi
java -cp "$classpath" org.apache.whirr.examples.Main "$@"
Modified: incubator/whirr/trunk/bin/whirr
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/bin/whirr?rev=1160355&r1=1160354&r2=1160355&view=diff
==============================================================================
--- incubator/whirr/trunk/bin/whirr (original)
+++ incubator/whirr/trunk/bin/whirr Mon Aug 22 18:15:43 2011
@@ -17,12 +17,13 @@
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
+opts="-Dlog4j.configuration=log4j-cli.xml"
if [ -d "$bin/../cli/target/lib" ]; then
- classpath="$bin/..:$bin/../cli/target/lib/*:$bin/../cli/target/*"
+ classpath="$bin/../conf/:$bin/..:$bin/../cli/target/lib/*:$bin/../cli/target/*"
else
- classpath="$bin/..:$bin/../lib/*"
+ classpath="$bin/../conf/:$bin/..:$bin/../lib/*"
fi
-java -cp "$classpath" org.apache.whirr.cli.Main "$@"
+java -cp "$classpath" $opts org.apache.whirr.cli.Main "$@"
Added: incubator/whirr/trunk/conf/log4j-cli.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/conf/log4j-cli.xml?rev=1160355&view=auto
==============================================================================
--- incubator/whirr/trunk/conf/log4j-cli.xml (added)
+++ incubator/whirr/trunk/conf/log4j-cli.xml Mon Aug 22 18:15:43 2011
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!--
+ For more configuration information and examples see the Apache
+ Log4j website: http://logging.apache.org/log4j/
+-->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="ROLLINGFILE" class="org.apache.log4j.DailyRollingFileAppender">
+ <param name="File" value="whirr.log" />
+ <param name="Append" value="true" />
+ <param name="DatePattern" value="'.'yyyy-MM-dd" />
+ <param name="Threshold" value="TRACE" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
+ </layout>
+ </appender>
+
+ <category name="org.apache.whirr">
+ <priority value="DEBUG" />
+ <appender-ref ref="ROLLINGFILE" />
+ </category>
+
+ <category name="jclouds.compute">
+ <priority value="DEBUG" />
+ <appender-ref ref="ROLLINGFILE" />
+ </category>
+
+ <category name="net.schmizz.sshj">
+ <priority value="ERROR" />
+ <appender-ref ref="CONSOLE" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="CONSOLE" />
+ </root>
+
+</log4j:configuration>
Copied: incubator/whirr/trunk/conf/log4j-example.xml (from r1160343, incubator/whirr/trunk/examples/src/main/resources/log4j.xml)
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/conf/log4j-example.xml?p2=incubator/whirr/trunk/conf/log4j-example.xml&p1=incubator/whirr/trunk/examples/src/main/resources/log4j.xml&r1=1160343&r2=1160355&rev=1160355&view=diff
==============================================================================
--- incubator/whirr/trunk/examples/src/main/resources/log4j.xml (original)
+++ incubator/whirr/trunk/conf/log4j-example.xml Mon Aug 22 18:15:43 2011
@@ -36,9 +36,14 @@
<appender-ref ref="CONSOLE" />
</category>
+ <category name="net.schmizz.sshj">
+ <priority value="ERROR" />
+ <appender-ref ref="CONSOLE" />
+ </category>
+
<root>
<priority value="DEBUG" />
<appender-ref ref="CONSOLE" />
</root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>