Skip to content

Commit

Permalink
migrated hornetq core tests ti use HornetQLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
andytaylor committed Apr 18, 2012
1 parent b821665 commit e10b71d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
import org.hornetq.core.client.impl.Topology;
import org.hornetq.core.client.impl.TopologyMember;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.impl.invm.InVMRegistry;
import org.hornetq.core.remoting.impl.invm.TransportConstants;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQComponent;
import org.hornetq.core.server.HornetQLogger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.NodeManager;
Expand Down Expand Up @@ -104,7 +104,7 @@ protected Topology waitForTopology(final HornetQServer server, final int nodes,

protected Topology waitForTopology(final HornetQServer server, final int liveNodes, final int backupNodes, final long timeout) throws Exception
{
log.debug("waiting for " + liveNodes + " on the topology for server = " + server);
HornetQLogger.LOGGER.debug("waiting for " + liveNodes + " on the topology for server = " + server);

long start = System.currentTimeMillis();

Expand Down Expand Up @@ -155,15 +155,15 @@ protected Topology waitForTopology(final HornetQServer server, final int liveNod
topology.describe() +
")";

log.error(msg);
HornetQLogger.LOGGER.error(msg);

throw new Exception(msg);
}


protected void waitForTopology(final HornetQServer server, String clusterConnectionName, final int nodes, final long timeout) throws Exception
{
log.debug("waiting for " + nodes + " on the topology for server = " + server);
HornetQLogger.LOGGER.debug("waiting for " + nodes + " on the topology for server = " + server);

long start = System.currentTimeMillis();

Expand All @@ -190,7 +190,7 @@ protected void waitForTopology(final HornetQServer server, String clusterConnect
topology +
")";

log.error(msg);
HornetQLogger.LOGGER.error(msg);

throw new Exception(msg);
}
Expand Down Expand Up @@ -294,7 +294,7 @@ protected static final TransportConfiguration createTransportConfiguration(boole
}

// Static --------------------------------------------------------
private final Logger log = Logger.getLogger(this.getClass());
private final HornetQLogger log = HornetQLogger.LOGGER;

// Constructors --------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
import org.hornetq.core.journal.impl.JournalImpl;
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.persistence.impl.journal.JournalStorageManager;
import org.hornetq.core.persistence.impl.journal.JournalStorageManager.ReferenceDescribe;
import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
Expand All @@ -88,6 +87,7 @@
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQComponent;
import org.hornetq.core.server.HornetQLogger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.JournalType;
import org.hornetq.core.server.MessageReference;
Expand All @@ -111,7 +111,7 @@ public abstract class UnitTestCase extends TestCase
{
// Constants -----------------------------------------------------

private static final Logger log = Logger.getLogger(UnitTestCase.class);
private static final HornetQLogger log = HornetQLogger.LOGGER;

public static final String INVM_ACCEPTOR_FACTORY = InVMAcceptorFactory.class.getCanonicalName();

Expand Down Expand Up @@ -419,7 +419,7 @@ public static String threadDump(final String msg)
/** Sends the message to both logger and System.out (for unit report) */
public void logAndSystemOut(String message, Exception e)
{
Logger log = Logger.getLogger(this.getClass());
HornetQLogger log = HornetQLogger.LOGGER;
log.info(message, e);
System.out.println(message);
e.printStackTrace(System.out);
Expand All @@ -428,7 +428,7 @@ public void logAndSystemOut(String message, Exception e)
/** Sends the message to both logger and System.out (for unit report) */
public void logAndSystemOut(String message)
{
Logger log = Logger.getLogger(this.getClass());
HornetQLogger log = HornetQLogger.LOGGER;
log.info(message);
System.out.println(this.getClass().getName() + "::" + message);
}
Expand Down

0 comments on commit e10b71d

Please sign in to comment.