Replace the System.out calls with loggers.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1222250 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-12-22 14:23:25 +00:00
parent 323eeda725
commit d97e8fe354
1 changed files with 12 additions and 12 deletions

View File

@ -28,6 +28,8 @@ import org.apache.activemq.command.ActiveMQMessage;
import org.apache.activemq.command.MessageId; import org.apache.activemq.command.MessageId;
import org.apache.activemq.command.ProducerId; import org.apache.activemq.command.ProducerId;
import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.IdGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* ActiveMQMessageAuditTest * ActiveMQMessageAuditTest
@ -36,6 +38,7 @@ import org.apache.activemq.util.IdGenerator;
*/ */
public class ActiveMQMessageAuditTest extends TestCase { public class ActiveMQMessageAuditTest extends TestCase {
static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageAuditTest.class);
/** /**
* Constructor for ActiveMQMessageAuditTest. * Constructor for ActiveMQMessageAuditTest.
@ -128,18 +131,17 @@ public class ActiveMQMessageAuditTest extends TestCase {
ActiveMQMessageAuditNoSync audit = new ActiveMQMessageAuditNoSync(); ActiveMQMessageAuditNoSync audit = new ActiveMQMessageAuditNoSync();
byte[] bytes = serialize(audit); byte[] bytes = serialize(audit);
System.out.println(bytes.length); LOG.debug("Length: " + bytes.length);
audit = recover(bytes); audit = recover(bytes);
List<MessageReference> list = new ArrayList<MessageReference>(); List<MessageReference> list = new ArrayList<MessageReference>();
for (int j = 0; j < 1000; j++) { for (int j = 0; j < 1000; j++) {
ProducerId pid = new ProducerId(); ProducerId pid = new ProducerId();
pid.setConnectionId("test"); pid.setConnectionId("test");
pid.setSessionId(0); pid.setSessionId(0);
pid.setValue(j); pid.setValue(j);
System.out.println("producer " + j); LOG.debug("producer " + j);
for (int i = 0; i < 1000; i++) { for (int i = 0; i < 1000; i++) {
MessageId id = new MessageId(); MessageId id = new MessageId();
@ -152,7 +154,7 @@ public class ActiveMQMessageAuditTest extends TestCase {
if (i % 100 == 0) { if (i % 100 == 0) {
bytes = serialize(audit); bytes = serialize(audit);
System.out.println(bytes.length); LOG.debug("Length: " + bytes.length);
audit = recover(bytes); audit = recover(bytes);
} }
@ -162,13 +164,11 @@ public class ActiveMQMessageAuditTest extends TestCase {
} }
list.clear(); list.clear();
bytes = serialize(audit); bytes = serialize(audit);
System.out.println(bytes.length); LOG.debug("Length: " + bytes.length);
audit = recover(bytes); audit = recover(bytes);
} }
} }
} }
} }
protected byte[] serialize(ActiveMQMessageAuditNoSync audit) throws Exception { protected byte[] serialize(ActiveMQMessageAuditNoSync audit) throws Exception {