Issue 74: changed scope for performance tests

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1969 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-10-11 18:38:02 +00:00
parent 50fc3cb913
commit 06c63e6284
2 changed files with 78 additions and 2 deletions

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2009 Global Cloud Specialists, Inc. <info@globalcloudspecialists.com>
====================================================================
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 infromation and examples see the Apache Log4j
website: http://logging.apache.org/log4j/
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="target/test-data/jclouds.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="Threshold" value="WARN" />
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
<!--
The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x)
%m%n"/>
-->
</layout>
</appender>
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
<appender-ref ref="FILE" />
</appender>
<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root>
<priority value="WARN" />
<appender-ref ref="ASYNC" />
</root>
</log4j:configuration>

View File

@ -78,7 +78,7 @@ public abstract class BaseLifeCycle implements Runnable, LifeCycle {
this.status = Status.SHUTTING_DOWN; this.status = Status.SHUTTING_DOWN;
doShutdown(); doShutdown();
this.status = Status.SHUT_DOWN; this.status = Status.SHUT_DOWN;
logger.info("%1$s", this); logger.info("Shutdown %s", this);
} }
protected abstract void doWork() throws Exception; protected abstract void doWork() throws Exception;
@ -186,7 +186,7 @@ public abstract class BaseLifeCycle implements Runnable, LifeCycle {
protected void exceptionIfNotActive() { protected void exceptionIfNotActive() {
if (!status.equals(Status.ACTIVE)) if (!status.equals(Status.ACTIVE))
throw new IllegalStateException(String.format("not active: %1$s", this)); throw new IllegalStateException(String.format("not active: %s", this));
} }
} }