remove wasteful way of logging

This commit is contained in:
Roland 2011-12-29 16:27:10 +01:00
parent 0f9f23b4cd
commit b15f4a2f1a

View file

@ -60,6 +60,7 @@ abstract class RemoteClient private[akka] (
* Converts the message to the wireprotocol and sends the message across the wire
*/
def send(message: Any, senderOption: Option[ActorRef], recipient: ActorRef): Unit = if (isRunning) {
log.debug("Sending message: {}", message)
send(remoteSupport.createRemoteMessageProtocolBuilder(recipient, message, senderOption).build)
} else {
val exception = new RemoteClientException("RemoteModule client is not running, make sure you have invoked 'RemoteClient.connect()' before using it.", remoteSupport, remoteAddress)
@ -71,8 +72,6 @@ abstract class RemoteClient private[akka] (
* Sends the message across the wire
*/
def send(request: RemoteMessageProtocol): Unit = {
log.debug("Sending message: {}", new RemoteMessage(request, remoteSupport.system))
try {
val payload = remoteSupport.createMessageSendEnvelope(request)
currentChannel.write(payload).addListener(