summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-07-16 15:57:26 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-07-16 15:57:26 +0000
commit2ea878974b0ddb24c9ca08756efafb38bd548748 (patch)
treef314421fdc24bffd28a072c22fd8770a18bbb720
parent7acd91cbf314d4dd039cfd4b83185aada083d7cb (diff)
downloadqpid-python-2ea878974b0ddb24c9ca08756efafb38bd548748.tar.gz
Update to the logging to ensure QpidTestCase is always logged and standardized the protocol output format between 0-8/0-9 and 0-10
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677319 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java4
-rw-r--r--java/common/src/main/java/log4j.properties3
-rw-r--r--java/cpp.async.testprofile2
-rw-r--r--java/cpp.sync.testprofile2
-rw-r--r--java/cpp.testprofile2
-rw-r--r--java/default-longrunning.testprofile20
-rw-r--r--java/default.testprofile2
-rw-r--r--java/log4j-test.xml16
-rw-r--r--java/module.xml2
9 files changed, 49 insertions, 4 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index c07e4d6c2e..28544324b1 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -488,7 +488,7 @@ public class AMQProtocolHandler extends IoHandlerAdapter
{
if (PROTOCOL_DEBUG)
{
- _protocolLogger.info("Recv:"+message);
+ _protocolLogger.info("RECV: [%s] %s", this, message);
}
if(message instanceof AMQFrame)
@@ -574,7 +574,7 @@ public class AMQProtocolHandler extends IoHandlerAdapter
{
if (PROTOCOL_DEBUG)
{
- _protocolLogger.info("Send:"+message);
+ _protocolLogger.debug("SEND: [%s] %s", this, message);
}
final long sentMessages = _messagesOut++;
diff --git a/java/common/src/main/java/log4j.properties b/java/common/src/main/java/log4j.properties
index 3f9554c0b4..0b3b96933e 100644
--- a/java/common/src/main/java/log4j.properties
+++ b/java/common/src/main/java/log4j.properties
@@ -23,6 +23,9 @@ log4j.logger.qpid.protocol=${amqj.protocol.logging.level}, console
log4j.additivity.qpid.protocol=false
log4j.logger.org.apache.qpid=${amqj.logging.level}, console
log4j.additivity.org.apache.qpid=false
+log4j.logger.org.apache.qpidity=${amqj.logging.level}, console
+log4j.additivity.org.apache.qpidity=false
+
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=all
diff --git a/java/cpp.async.testprofile b/java/cpp.async.testprofile
index 5e9b14ea9f..ad0317472e 100644
--- a/java/cpp.async.testprofile
+++ b/java/cpp.async.testprofile
@@ -8,8 +8,10 @@ test.excludes=true
test.excludesfile=${project.root}/010ExcludeList-store
log=info
amqj.logging.level=$log
+amqj.protocol.logging.level=$log
root.logging.level=$log
log4j.configuration=file://${project.root}/log4j-test.xml
+log4j.debug=false
test.fork=no
test.mem=512M
test=*Test
diff --git a/java/cpp.sync.testprofile b/java/cpp.sync.testprofile
index cb52937cd1..643e2eba79 100644
--- a/java/cpp.sync.testprofile
+++ b/java/cpp.sync.testprofile
@@ -8,8 +8,10 @@ max_prefetch=1000
test.excludesfile=${project.root}/010ExcludeList-store
log=info
amqj.logging.level=$log
+amqj.protocol.logging.level=$log
root.logging.level=$log
log4j.configuration=file://${project.root}/log4j-test.xml
+log4j.debug=false
test.fork=no
test.mem=512M
test=*Test
diff --git a/java/cpp.testprofile b/java/cpp.testprofile
index 6db245b007..e4db7fcd3a 100644
--- a/java/cpp.testprofile
+++ b/java/cpp.testprofile
@@ -8,8 +8,10 @@ test.excludes=true
test.excludesfile=${project.root}/010ExcludeList
log=info
amqj.logging.level=$log
+amqj.protocol.logging.level=$log
root.logging.level=$log
log4j.configuration=file://${project.root}/log4j-test.xml
+log4j.debug=false
test.fork=no
test.mem=512M
test=*Test
diff --git a/java/default-longrunning.testprofile b/java/default-longrunning.testprofile
new file mode 100644
index 0000000000..819e873370
--- /dev/null
+++ b/java/default-longrunning.testprofile
@@ -0,0 +1,20 @@
+broker.version=0-8
+broker=vm
+broker.clean=${project.root}/clean-dir ${build.data}
+java.naming.provider.url=${project.root}/test-provider.properties
+test.excludes=true
+test.excludesfile=${project.root}/08ExcludeList
+test.includesfile=${project.root}/08LongRunningList
+log=info
+max_prefetch=1000
+amqj.logging.level=$log
+amqj.protocol.logging.level=$log
+root.logging.level=$log
+log4j.configuration=file:///${project.root}/log4j-test.xml
+log4j.debug=false
+test.fork=no
+test.mem=512M
+test=*Test
+haltonfailure=no
+haltonerror=no
+exclude.modules=none
diff --git a/java/default.testprofile b/java/default.testprofile
index 4f749b84a7..30e13f9b38 100644
--- a/java/default.testprofile
+++ b/java/default.testprofile
@@ -7,8 +7,10 @@ test.excludesfile=${project.root}/08ExcludeList
log=info
max_prefetch=1000
amqj.logging.level=$log
+amqj.protocol.logging.level=$log
root.logging.level=$log
log4j.configuration=file:///${project.root}/log4j-test.xml
+log4j.debug=false
test.fork=no
test.mem=512M
test=*Test
diff --git a/java/log4j-test.xml b/java/log4j-test.xml
index d75d0112a6..a27d9fef2e 100644
--- a/java/log4j-test.xml
+++ b/java/log4j-test.xml
@@ -35,11 +35,23 @@
</appender>
<logger name="org.apache.qpid">
- <level value="debug"/>
+ <level value="${amqj.logging.level}"/>
+ </logger>
+
+ <logger name="org.apache.qpidity">
+ <level value="${amqj.logging.level}"/>
+ </logger>
+
+ <logger name="qpid.protocol">
+ <level value="${amqj.protocol.logging.level}"/>
+ </logger>
+
+ <logger name="org.apache.qpid.test.utils.QpidTestCase">
+ <level value="ALL"/>
</logger>
<root>
- <level value="debug"/>
+ <level value="${root.logging.level}"/>
<appender-ref ref="console" />
</root>
</log4j:configuration>
diff --git a/java/module.xml b/java/module.xml
index df0572a48b..6ca4211087 100644
--- a/java/module.xml
+++ b/java/module.xml
@@ -211,6 +211,8 @@
<jvmarg value="${jvm.args}"/>
<sysproperty key="amqj.logging.level" value="${amqj.logging.level}"/>
+ <sysproperty key="amqj.protocol.logging.level" value="${amqj.protocol.logging.level}"/>
+ <sysproperty key="log4j.debug" value="${log4j.debug}"/>
<sysproperty key="root.logging.level" value="${root.logging.level}"/>
<sysproperty key="log4j.configuration" value="${log4j.configuration}"/>
<sysproperty key="java.naming.factory.initial" value="${java.naming.factory.initial}"/>