aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java13
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java14
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/CallGibberishImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicTelephonyGibberishImpl.java16
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetTelephonyConferencingGibberishImpl.java5
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderServiceGibberishImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/AdHocChatRoomIcqImpl.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/IncomingFileTransferRequestIcqImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/InfoRetreiver.java27
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java42
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetFileTransferIcqImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java90
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetTypingNotificationsIcqImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java51
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java102
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/IrcActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java39
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ActiveCallsRepository.java18
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomConfigurationFormJabberImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java27
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/IncomingFileTransferRequestJabberImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java42
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java57
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetMultiUserChatJabberImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OutgoingFileTransferJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java18
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java51
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/UriHandlerJabberImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardParticipantJabberImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java15
42 files changed, 543 insertions, 276 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java b/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java
index 8128a75..b98efca 100644
--- a/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/AccountManagerImpl.java
@@ -109,15 +109,17 @@ public class AccountManagerImpl
List<String> storedAccounts =
configService.getPropertyNamesByPrefix(factoryPackage, true);
- logger.debug("Discovered " + storedAccounts.size() + " stored "
- + factoryPackage + " accounts");
+ if (logger.isDebugEnabled())
+ logger.debug("Discovered " + storedAccounts.size() + " stored "
+ + factoryPackage + " accounts");
for (Iterator<String> storedAccountIter = storedAccounts.iterator(); storedAccountIter
.hasNext();)
{
String storedAccount = storedAccountIter.next();
- logger.debug("Loading account " + storedAccount);
+ if (logger.isDebugEnabled())
+ logger.debug("Loading account " + storedAccount);
List<String> storedAccountProperties =
configService.getPropertyNamesByPrefix(storedAccount, true);
@@ -557,8 +559,9 @@ public class AccountManagerImpl
if (configurationProperties.size() > 0)
configurationService.setProperties(configurationProperties);
- logger.debug("Stored account for id " + accountID.getAccountUniqueID()
- + " for package " + factoryPackage);
+ if (logger.isDebugEnabled())
+ logger.debug("Stored account for id " + accountID.getAccountUniqueID()
+ + " for package " + factoryPackage);
}
private String stripPackagePrefix(String property)
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java b/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
index 8ced7a3..c7be0bb 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
@@ -63,7 +63,8 @@ public class DictActivator
dictProviderFactory,
hashtable);
- logger.info("DICT protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("DICT protocol implementation [STARTED].");
}
/**
@@ -93,7 +94,8 @@ public class DictActivator
dictProviderFactory.stop();
dictPpFactoryServReg.unregister();
- logger.info("DICT protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("DICT protocol implementation [STOPPED].");
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java
index 93e9e21..445783b 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServiceDictImpl.java
@@ -69,7 +69,8 @@ public class ProtocolProviderServiceDictImpl
*/
public ProtocolProviderServiceDictImpl()
{
- logger.trace("Creating a Dict provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a Dict provider.");
}
/**
@@ -237,7 +238,8 @@ public class ProtocolProviderServiceDictImpl
}
catch (DictException dx)
{
- logger.info(dx);
+ if (logger.isInfoEnabled())
+ logger.info(dx);
}
return false;
@@ -254,8 +256,9 @@ public class ProtocolProviderServiceDictImpl
{
return;
}
- logger.trace("Killing the Dict Protocol Provider for account "
- + this.accountID.getUserID());
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Dict Protocol Provider for account "
+ + this.accountID.getUserID());
closeConnection();
@@ -310,7 +313,8 @@ public class ProtocolProviderServiceDictImpl
}
catch (DictException dx)
{
- logger.info(dx);
+ if (logger.isInfoEnabled())
+ logger.info(dx);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/CallGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/CallGibberishImpl.java
index 978b7e9..39b8ece 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/CallGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/CallGibberishImpl.java
@@ -78,7 +78,8 @@ public class CallGibberishImpl
this.callPeers.add(callPeer);
- logger.info("Will fire peer added");
+ if (logger.isInfoEnabled())
+ logger.info("Will fire peer added");
fireCallPeerEvent(
callPeer, CallPeerEvent.CALL_PEER_ADDED);
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
index 6bc7e3d..1c613cc 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
@@ -71,7 +71,8 @@ public class GibberishActivator
gibberishProviderFactory,
hashtable);
- logger.info("Gibberish protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("Gibberish protocol implementation [STARTED].");
}
/**
@@ -112,7 +113,8 @@ public class GibberishActivator
{
gibberishProviderFactory.stop();
gibberishPpFactoryServReg.unregister();
- logger.info("Gibberish protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("Gibberish protocol implementation [STOPPED].");
}
public static ResourceManagementService getResources()
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicTelephonyGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicTelephonyGibberishImpl.java
index 9f7eb7b..e326f73 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicTelephonyGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetBasicTelephonyGibberishImpl.java
@@ -62,7 +62,8 @@ public class OperationSetBasicTelephonyGibberishImpl
= (CallPeerGibberishImpl) peer;
if(peer.getState().equals(CallPeerState.CONNECTED))
{
- logger.info("Ignoring user request to answer a CallPeer "
+ if (logger.isInfoEnabled())
+ logger.info("Ignoring user request to answer a CallPeer "
+ "that is already connected. CP:" + peer);
return;
}
@@ -150,15 +151,17 @@ public class OperationSetBasicTelephonyGibberishImpl
//do nothing if the call is already ended
if (peer.getState().equals(CallPeerState.DISCONNECTED))
{
- logger.debug("Ignoring a request to hangup a call peer "
- +"that is already DISCONNECTED");
+ if (logger.isDebugEnabled())
+ logger.debug("Ignoring a request to hangup a call peer "
+ +"that is already DISCONNECTED");
return;
}
CallPeerGibberishImpl callPeer
= (CallPeerGibberishImpl) peer;
- logger.info("hangupCallPeer");
+ if (logger.isInfoEnabled())
+ logger.info("hangupCallPeer");
callPeer.setState(CallPeerState.DISCONNECTED, null);
CallGibberishImpl call = (CallGibberishImpl) callPeer.getCall();
@@ -207,8 +210,9 @@ public class OperationSetBasicTelephonyGibberishImpl
CallGibberishImpl sourceCall = (CallGibberishImpl) this.activeCalls
.remove(evt.getSourceCall().getCallID());
- logger.trace( "Removing call " + sourceCall + " from the list of "
- + "active calls because it entered an ENDED state");
+ if (logger.isTraceEnabled())
+ logger.trace( "Removing call " + sourceCall + " from the list of "
+ + "active calls because it entered an ENDED state");
fireCallEvent(CallEvent.CALL_ENDED, sourceCall);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetTelephonyConferencingGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetTelephonyConferencingGibberishImpl.java
index cae3631..8da8b1e 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetTelephonyConferencingGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/OperationSetTelephonyConferencingGibberishImpl.java
@@ -118,8 +118,9 @@ public class OperationSetTelephonyConferencingGibberishImpl
CallGibberishImpl sourceCall = (CallGibberishImpl) this.activeCalls
.remove(evt.getSourceCall().getCallID());
- logger.trace( "Removing call " + sourceCall + " from the list of "
- + "active calls because it entered an ENDED state");
+ if (logger.isTraceEnabled())
+ logger.trace( "Removing call " + sourceCall + " from the list of "
+ + "active calls because it entered an ENDED state");
telephonyOpSet.fireCallEvent(CallEvent.CALL_ENDED, sourceCall);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderServiceGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderServiceGibberishImpl.java
index 40cf85c..56d26b9 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderServiceGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderServiceGibberishImpl.java
@@ -61,7 +61,8 @@ public class ProtocolProviderServiceGibberishImpl
*/
public ProtocolProviderServiceGibberishImpl()
{
- logger.trace("Creating a gibberish provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a gibberish provider.");
}
/**
@@ -246,7 +247,8 @@ public class ProtocolProviderServiceGibberishImpl
{
return;
}
- logger.trace("Killing the Gibberish Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Gibberish Protocol Provider.");
if(isRegistered())
{
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/AdHocChatRoomIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/AdHocChatRoomIcqImpl.java
index 5ca6667..40c2e41 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/AdHocChatRoomIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/AdHocChatRoomIcqImpl.java
@@ -441,7 +441,8 @@ public class AdHocChatRoomIcqImpl
}
catch (Exception e)
{
- logger.debug("Failed to send a conference message.");
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to send a conference message.");
throw new OperationFailedException(
"Failed to send a conference message.",
OperationFailedException.GENERAL_ERROR);
@@ -504,7 +505,8 @@ public class AdHocChatRoomIcqImpl
new AdHocChatRoomParticipantPresenceChangeEvent(this, member,
eventID, eventReason);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterator<AdHocChatRoomParticipantPresenceListener> listeners = null;
synchronized (memberListeners)
@@ -558,7 +560,8 @@ public class AdHocChatRoomIcqImpl
public void handleIncomingMessage(ChatRoomSession chatRoomSession,
ChatRoomUser chatRoomUser, ChatMessage chatMessage)
{
- logger.debug("Incoming multi user chat message received: "
+ if (logger.isDebugEnabled())
+ logger.debug("Incoming multi user chat message received: "
+ chatMessage.getMessage());
String msgBody = chatMessage.getMessage();
@@ -603,7 +606,8 @@ public class AdHocChatRoomIcqImpl
ChatSessionState oldChatSessionState,
ChatSessionState newChatSessionState)
{
- logger.debug("ChatRoomSessionState changed to: "
+ if (logger.isDebugEnabled())
+ logger.debug("ChatRoomSessionState changed to: "
+ newChatSessionState);
if (chatInvitation == null
@@ -615,7 +619,8 @@ public class AdHocChatRoomIcqImpl
}
catch (Exception e)
{
- logger.debug("Failed to join the chat room: " + e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to join the chat room: " + e);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/IncomingFileTransferRequestIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/IncomingFileTransferRequestIcqImpl.java
index a500ffa..72272ba 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/IncomingFileTransferRequestIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/IncomingFileTransferRequestIcqImpl.java
@@ -174,7 +174,8 @@ public class IncomingFileTransferRequestIcqImpl
}
catch(IllegalStateException e)
{
- logger.debug("Error rejecting file",e);
+ if (logger.isDebugEnabled())
+ logger.debug("Error rejecting file",e);
return;
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/InfoRetreiver.java b/src/net/java/sip/communicator/impl/protocol/icq/InfoRetreiver.java
index da5b19a..89395a3 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/InfoRetreiver.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/InfoRetreiver.java
@@ -165,42 +165,50 @@ public class InfoRetreiver
if (snac instanceof MetaBasicInfoCmd)
{
- logger.info("received basic info");
+ if (logger.isInfoEnabled())
+ logger.info("received basic info");
readBasicUserInfo((MetaBasicInfoCmd)snac);
}
else if (snac instanceof MetaMoreInfoCmd)
{
- logger.info("received meta more info");
+ if (logger.isInfoEnabled())
+ logger.info("received meta more info");
readMoreUserInfo((MetaMoreInfoCmd)snac);
}
else if (snac instanceof MetaEmailInfoCmd)
{
- logger.info("received email info");
+ if (logger.isInfoEnabled())
+ logger.info("received email info");
readEmailUserInfo((MetaEmailInfoCmd)snac);
}
else if (snac instanceof MetaHomepageCategoryInfoCmd)
{
- logger.info("received home page info");
+ if (logger.isInfoEnabled())
+ logger.info("received home page info");
readHomePageUserInfo((MetaHomepageCategoryInfoCmd)snac);
}
else if (snac instanceof MetaWorkInfoCmd)
{
- logger.info("received work info");
+ if (logger.isInfoEnabled())
+ logger.info("received work info");
readWorkUserInfo((MetaWorkInfoCmd)snac);
}
else if (snac instanceof MetaNotesInfoCmd)
{
- logger.info("received notes info");
+ if (logger.isInfoEnabled())
+ logger.info("received notes info");
readUserAboutInfo((MetaNotesInfoCmd)snac);
}
else if (snac instanceof MetaInterestsInfoCmd)
{
- logger.info("received interest info");
+ if (logger.isInfoEnabled())
+ logger.info("received interest info");
readInterestsUserInfo((MetaInterestsInfoCmd)snac);
}
else if (snac instanceof MetaAffiliationsInfoCmd)
{
- logger.info("received affiliations info");
+ if (logger.isInfoEnabled())
+ logger.info("received affiliations info");
readAffilationsUserInfo((MetaAffiliationsInfoCmd)snac);
result =
@@ -220,7 +228,8 @@ public class InfoRetreiver
}
catch (InterruptedException ex)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"Interrupted while waiting for a subscription evt", ex);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
index 3217c47..ba963a5 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
@@ -415,7 +415,8 @@ public class OperationSetAdHocMultiUserChatIcqImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The ICQ provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The ICQ provider changed state from: "
+ evt.getOldState() + " to: " + evt.getNewState());
if (evt.getNewState() == RegistrationState.REGISTERED)
{
@@ -444,7 +445,8 @@ public class OperationSetAdHocMultiUserChatIcqImpl
public void handleInvitation(ChatRoomManager chatRoomManager,
ChatInvitation chatInvitation)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"Invitation received: " + chatInvitation.getRoomName());
AdHocChatRoom chatRoom
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
index c8cac08..00d4865 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
@@ -244,7 +244,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
public void handleResponse(SnacResponseEvent evt)
{
SnacCommand snac = evt.getSnacCommand();
- logger.debug("Received a response to our offline message request: " +
+ if (logger.isDebugEnabled())
+ logger.debug("Received a response to our offline message request: " +
snac);
if (snac instanceof OfflineMsgIcqCmd)
@@ -256,7 +257,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
opSetPersPresence.findContactByID(contactUIN);
if (sourceContact == null)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"received a message from a unknown contact: "
+ contactUIN);
//create the volatile contact
@@ -284,14 +286,16 @@ public class OperationSetBasicInstantMessagingIcqImpl
if (msgReceivedEvt != null)
{
- logger.debug("fire msg received for : " +
+ if (logger.isDebugEnabled())
+ logger.debug("fire msg received for : " +
offlineMsgCmd.getContents());
fireMessageEvent(msgReceivedEvt);
}
}
else if (snac instanceof OfflineMsgDoneCmd)
{
- logger.debug("send ack to delete offline messages");
+ if (logger.isDebugEnabled())
+ logger.debug("send ack to delete offline messages");
OfflineMsgIcqAckCmd offlineMsgDeleteReq = new
OfflineMsgIcqAckCmd(
@@ -305,7 +309,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
}
else if (snac instanceof SnacError)
{
- logger.debug("error receiving offline messages");
+ if (logger.isDebugEnabled())
+ logger.debug("error receiving offline messages");
}
}
}
@@ -383,12 +388,14 @@ public class OperationSetBasicInstantMessagingIcqImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The ICQ provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The ICQ provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
if(evt.getNewState() == RegistrationState.FINALIZING_REGISTRATION)
{
- logger.debug("adding a Bos Service Listener");
+ if (logger.isDebugEnabled())
+ logger.debug("adding a Bos Service Listener");
icqProvider.getAimConnection().getIcbmService()
.addIcbmListener(joustSimIcbmListener);
@@ -462,7 +469,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
public void buddyInfoUpdated(IcbmService service, Screenname buddy,
IcbmBuddyInfo info)
{
- logger.debug("buddy info pudated for " + buddy
+ if (logger.isDebugEnabled())
+ logger.debug("buddy info pudated for " + buddy
+ " new info is: " + info);
}
@@ -471,7 +479,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
net.kano.joustsim.oscar.oscar.service.icbm.Message message,
Set<Conversation> triedConversations)
{
- logger.debug("sendAutomaticallyFailed message : " + message);
+ if (logger.isDebugEnabled())
+ logger.debug("sendAutomaticallyFailed message : " + message);
}
}
@@ -497,9 +506,9 @@ public class OperationSetBasicInstantMessagingIcqImpl
if (logger.isDebugEnabled())
logger.debug("Received from "
- + conversation.getBuddy()
- + " the message "
- + msgBody);
+ + conversation.getBuddy()
+ + " the message "
+ + msgBody);
if(msgBody.startsWith(SYS_MSG_PREFIX_TEST)
&& conversation.getBuddy().getFormatted().
@@ -534,7 +543,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
.getFormatted());
if(sourceContact == null)
{
- logger.debug("received a message from a unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a message from a unknown contact: "
+ conversation.getBuddy());
//create the volatile contact
sourceContact = opSetPersPresence
@@ -633,7 +643,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
keepAliveTimer.schedule(
new KeepAliveCheckTask(), KEEPALIVE_WAIT);
- logger.trace("send keepalive");
+ if (logger.isTraceEnabled())
+ logger.trace("send keepalive");
imConversation.sendMessage(new SimpleMessage(sysMsg.toString()));
}
catch (Exception ex)
@@ -681,7 +692,8 @@ public class OperationSetBasicInstantMessagingIcqImpl
{
String receivedStr = receivedKeepAlivePackets.removeLast();
- logger.trace("Last keep alive message is: " + receivedStr);
+ if (logger.isTraceEnabled())
+ logger.trace("Last keep alive message is: " + receivedStr);
receivedStr = receivedStr.replaceAll(SYS_MSG_PREFIX_TEST, "");
String[] ss = receivedStr.split("&");
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetFileTransferIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetFileTransferIcqImpl.java
index e8b5966..8a54ba3 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetFileTransferIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetFileTransferIcqImpl.java
@@ -106,7 +106,8 @@ public class OperationSetFileTransferIcqImpl
}
catch (IOException e)
{
- logger.debug("Error sending file",e);
+ if (logger.isDebugEnabled())
+ logger.debug("Error sending file",e);
return null;
}
@@ -216,7 +217,8 @@ public class OperationSetFileTransferIcqImpl
{
if (transfer instanceof IncomingFileTransfer)
{
- logger.trace("Incoming Icq file transfer request " + transfer.getClass());
+ if (logger.isTraceEnabled())
+ logger.trace("Incoming Icq file transfer request " + transfer.getClass());
if(!(transfer instanceof IncomingFileTransfer))
{
@@ -388,7 +390,8 @@ public class OperationSetFileTransferIcqImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
index 3e5c8fe..1b9fcc2 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
@@ -536,7 +536,8 @@ public class OperationSetPersistentPresenceIcqImpl
return;
}
- logger.trace("Going to remove contact from ss-list : " + contact);
+ if (logger.isTraceEnabled())
+ logger.trace("Going to remove contact from ss-list : " + contact);
if( !contactGroup.isPersistent()
&& contactIcqImpl.getJoustSimBuddy().isAwaitingAuthorization())
@@ -603,7 +604,8 @@ public class OperationSetPersistentPresenceIcqImpl
throw new IllegalArgumentException(
status + " is not a valid ICQ/AIM status");
- logger.debug("Will set status: " + status);
+ if (logger.isDebugEnabled())
+ logger.debug("Will set status: " + status);
MainBosService bosService
= parentProvider.getAimConnection().getBosService();
@@ -641,7 +643,8 @@ public class OperationSetPersistentPresenceIcqImpl
{
long icqStatus = presenceStatusToStatusLong(status);
- logger.debug("Will set status: " + status + " long=" + icqStatus);
+ if (logger.isDebugEnabled())
+ logger.debug("Will set status: " + status + " long=" + icqStatus);
bosService.getOscarConnection().sendSnac(new SetExtraInfoCmd(icqStatus));
@@ -926,7 +929,8 @@ public class OperationSetPersistentPresenceIcqImpl
//whatever it is it means that to us the buddy in question
//is as good as offline so leave status at -1 and notify.
- logger.debug("status is" + status);
+ if (logger.isDebugEnabled())
+ logger.debug("status is" + status);
synchronized(this){
this.notifyAll();
}
@@ -1010,7 +1014,8 @@ public class OperationSetPersistentPresenceIcqImpl
PresenceStatus newStatus = statusLongToPresenceStatus(newStatusL);
if (oldStatus.equals(newStatus))
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"Ignored prov stat. change evt. old==new = "
+ oldStatus);
else
@@ -1033,12 +1038,14 @@ public class OperationSetPersistentPresenceIcqImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The ICQ provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The ICQ provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
if(evt.getNewState() == RegistrationState.FINALIZING_REGISTRATION)
{
- logger.debug("adding a Bos Service Listener");
+ if (logger.isDebugEnabled())
+ logger.debug("adding a Bos Service Listener");
parentProvider.getAimConnection().getBosService()
.addMainBosServiceListener(joustSimBosListener);
@@ -1165,7 +1172,8 @@ public class OperationSetPersistentPresenceIcqImpl
*/
public void handleYourExtraInfo(List<ExtraInfoBlock> extraInfos)
{
- logger.debug("Got extra info: " + extraInfos);
+ if (logger.isDebugEnabled())
+ logger.debug("Got extra info: " + extraInfos);
// @xxx we should one day probably do something here, like check
// whether the status message has been changed for example.
for (ExtraInfoBlock block : extraInfos)
@@ -1173,10 +1181,12 @@ public class OperationSetPersistentPresenceIcqImpl
if (block.getType() == ExtraInfoBlock.TYPE_AVAILMSG){
String statusMessage = ExtraInfoData.readAvailableMessage(
block.getExtraData());
- logger.debug("Received a status message:" + statusMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("Received a status message:" + statusMessage);
if ( getCurrentStatusMessage().equals(statusMessage)){
- logger.debug("Status message is same as old. Ignoring");
+ if (logger.isDebugEnabled())
+ logger.debug("Status message is same as old. Ignoring");
return;
}
@@ -1202,9 +1212,12 @@ public class OperationSetPersistentPresenceIcqImpl
public void handleYourInfo(MainBosService service,
FullUserInfo userInfo)
{
- logger.debug("Received our own user info: " + userInfo);
- logger.debug("previous status was: " + currentIcqStatus);
- logger.debug("new status is: " + userInfo.getIcqStatus());
+ if (logger.isDebugEnabled())
+ logger.debug("Received our own user info: " + userInfo);
+ if (logger.isDebugEnabled())
+ logger.debug("previous status was: " + currentIcqStatus);
+ if (logger.isDebugEnabled())
+ logger.debug("new status is: " + userInfo.getIcqStatus());
//update the last received field.
long oldStatus = currentIcqStatus;
@@ -1265,8 +1278,10 @@ public class OperationSetPersistentPresenceIcqImpl
public void gotBuddyStatus(BuddyService service, Screenname buddy,
FullUserInfo info)
{
- logger.debug("Received a status update for buddy=" + buddy);
- logger.debug("Updated user info is " + info);
+ if (logger.isDebugEnabled())
+ logger.debug("Received a status update for buddy=" + buddy);
+ if (logger.isDebugEnabled())
+ logger.debug("Updated user info is " + info);
ContactIcqImpl sourceContact
= ssContactList.findContactByScreenName(buddy.getFormatted());
@@ -1305,13 +1320,15 @@ public class OperationSetPersistentPresenceIcqImpl
{
String status = ExtraInfoData.readAvailableMessage(
block.getExtraData());
- logger.info("Status Message is: " + status + ".");
+ if (logger.isInfoEnabled())
+ logger.info("Status Message is: " + status + ".");
sourceContact.setStatusMessage(status);
}
}
}
- logger.debug("Will Dispatch the contact status event.");
+ if (logger.isDebugEnabled())
+ logger.debug("Will Dispatch the contact status event.");
fireContactPresenceStatusChangeEvent(sourceContact, parent,
oldStatus, newStatus);
}
@@ -1326,7 +1343,8 @@ public class OperationSetPersistentPresenceIcqImpl
*/
public void buddyOffline(BuddyService service, Screenname buddy)
{
- logger.debug("Received a status update for buddy=" + buddy);
+ if (logger.isDebugEnabled())
+ logger.debug("Received a status update for buddy=" + buddy);
ContactIcqImpl sourceContact
= ssContactList.findContactByScreenName(buddy.getFormatted());
@@ -1361,10 +1379,14 @@ public class OperationSetPersistentPresenceIcqImpl
Screenname buddy, BuddyInfo info)
{
String statusMessage = info.getStatusMessage();
- logger.debug("buddy=" + buddy);
- logger.debug("info.getAwayMessage()=" + info.getAwayMessage());
- logger.debug("info.getOnlineSince()=" + info.getOnlineSince());
- logger.debug("info.getStatusMessage()=" + statusMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("buddy=" + buddy);
+ if (logger.isDebugEnabled())
+ logger.debug("info.getAwayMessage()=" + info.getAwayMessage());
+ if (logger.isDebugEnabled())
+ logger.debug("info.getOnlineSince()=" + info.getOnlineSince());
+ if (logger.isDebugEnabled())
+ logger.debug("info.getStatusMessage()=" + statusMessage);
ContactIcqImpl sourceContact
= ssContactList.findContactByScreenName(buddy.getFormatted());
@@ -1383,7 +1405,8 @@ public class OperationSetPersistentPresenceIcqImpl
{
public void authorizationDenied(Screenname screenname, String reason)
{
- logger.trace("authorizationDenied from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationDenied from " + screenname);
Contact srcContact = findContactByID(screenname.getFormatted());
authorizationHandler.processAuthorizationResponse(
@@ -1400,7 +1423,8 @@ public class OperationSetPersistentPresenceIcqImpl
public void authorizationAccepted(Screenname screenname, String reason)
{
- logger.trace("authorizationAccepted from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationAccepted from " + screenname);
Contact srcContact = findContactByID(screenname.getFormatted());
ssContactList.moveAwaitingAuthorizationContact(
(ContactIcqImpl)srcContact);
@@ -1413,7 +1437,8 @@ public class OperationSetPersistentPresenceIcqImpl
public void authorizationRequestReceived(Screenname screenname,
String reason)
{
- logger.trace("authorizationRequestReceived from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationRequestReceived from " + screenname);
Contact srcContact = findContactByID(screenname.getFormatted());
if(srcContact == null)
@@ -1439,9 +1464,11 @@ public class OperationSetPersistentPresenceIcqImpl
public boolean authorizationRequired(Screenname screenname, Group parentGroup)
{
- logger.trace("authorizationRequired from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationRequired from " + screenname);
- logger.trace("finding buddy : " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("finding buddy : " + screenname);
ContactIcqImpl srcContact =
ssContactList.findContactByScreenName(screenname.getFormatted());
@@ -1519,12 +1546,14 @@ public class OperationSetPersistentPresenceIcqImpl
public void futureAuthorizationGranted(Screenname screenname,
String reason)
{
- logger.trace("futureAuthorizationGranted from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("futureAuthorizationGranted from " + screenname);
}
public void youWereAdded(Screenname screenname)
{
- logger.trace("youWereAdded from " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("youWereAdded from " + screenname);
}
}
@@ -1582,7 +1611,8 @@ public class OperationSetPersistentPresenceIcqImpl
{
public void run()
{
- logger.trace("Running status retreiver for AwaitingAuthorizationContacts");
+ if (logger.isTraceEnabled())
+ logger.trace("Running status retreiver for AwaitingAuthorizationContacts");
ContactGroupIcqImpl theAwaitingAuthorizationGroup =
ssContactList.findContactGroup(
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java
index e8213bb..cfc304d 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java
@@ -767,7 +767,8 @@ public class OperationSetServerStoredAccountInfoIcqImpl
public void handleTimeout(SnacRequestTimeoutEvent event)
{
- logger.trace("Timeout!");
+ if (logger.isTraceEnabled())
+ logger.trace("Timeout!");
synchronized(waitingForResponseLock)
{
@@ -1517,7 +1518,8 @@ public class OperationSetServerStoredAccountInfoIcqImpl
}
catch (InterruptedException ex)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"Interrupted while waiting for a subscription evt", ex);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetTypingNotificationsIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetTypingNotificationsIcqImpl.java
index 20c1257..a1e1753 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetTypingNotificationsIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetTypingNotificationsIcqImpl.java
@@ -150,7 +150,8 @@ public class OperationSetTypingNotificationsIcqImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The ICQ provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The ICQ provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
if (evt.getNewState() == RegistrationState.FINALIZING_REGISTRATION)
@@ -186,7 +187,8 @@ public class OperationSetTypingNotificationsIcqImpl
public void buddyInfoUpdated(IcbmService service, Screenname buddy,
IcbmBuddyInfo info)
{
- logger.debug("buddyInfoUpdated for:"+buddy+" info: " +info);
+ if (logger.isDebugEnabled())
+ logger.debug("buddyInfoUpdated for:"+buddy+" info: " +info);
}
public void sendAutomaticallyFailed(
@@ -210,7 +212,8 @@ public class OperationSetTypingNotificationsIcqImpl
if(sourceContact == null)
{
- logger.debug("Received a typing notification from an unknown "+
+ if (logger.isDebugEnabled())
+ logger.debug("Received a typing notification from an unknown "+
"buddy=" + conversation.getBuddy());
//create the volatile contact
sourceContact = opSetPersPresence
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java
index 100f5a5..c896864 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java
@@ -656,7 +656,8 @@ public class ProtocolProviderServiceIcqImpl
State oldState = event.getOldState();
AimConnection conn = event.getAimConnection();
- logger.debug("ICQ protocol provider " + getProtocolName()
+ if (logger.isDebugEnabled())
+ logger.debug("ICQ protocol provider " + getProtocolName()
+ " changed registration status from "
+ oldState + " to " + newState);
@@ -688,7 +689,8 @@ public class ProtocolProviderServiceIcqImpl
discconectCode);
reasonStr = ConnectionClosedListener
.convertCodeToStringReason(discconectCode);
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"The aim Connection was disconnected! with reason : "
+ reasonStr);
}
@@ -704,12 +706,14 @@ public class ProtocolProviderServiceIcqImpl
}
}
else
- logger.debug("The aim Connection was disconnected!");
+ if (logger.isDebugEnabled())
+ logger.debug("The aim Connection was disconnected!");
}
else
if(newState == State.FAILED)
{
- logger.debug("The aim Connection failed! "
+ if (logger.isDebugEnabled())
+ logger.debug("The aim Connection failed! "
+ event.getNewStateInfo());
}
@@ -722,7 +726,8 @@ public class ProtocolProviderServiceIcqImpl
if(loginFailure instanceof AuthFailureInfo)
{
AuthFailureInfo afi = (AuthFailureInfo)loginFailure;
- logger.debug("AuthFailureInfo code : " +
+ if (logger.isDebugEnabled())
+ logger.debug("AuthFailureInfo code : " +
afi.getErrorCode());
int code = ConnectionClosedListener
.convertAuthCodeToReasonCode(afi);
@@ -831,7 +836,8 @@ public class ProtocolProviderServiceIcqImpl
*/
public void newConversation(IcbmService service, Conversation conv)
{
- logger.debug("Received a new conversation event");
+ if (logger.isDebugEnabled())
+ logger.debug("Received a new conversation event");
conv.addConversationListener(new AimConversationListener());
}
@@ -844,7 +850,8 @@ public class ProtocolProviderServiceIcqImpl
public void buddyInfoUpdated(IcbmService service, Screenname buddy,
IcbmBuddyInfo info)
{
- logger.debug("Got a BuddINFO event");
+ if (logger.isDebugEnabled())
+ logger.debug("Got a BuddINFO event");
}
/**
@@ -867,53 +874,62 @@ public class ProtocolProviderServiceIcqImpl
public void sentOtherEvent(Conversation conversation,
ConversationEventInfo event)
{
- logger.debug("reveived ConversationEventInfo:" + event);
+ if (logger.isDebugEnabled())
+ logger.debug("reveived ConversationEventInfo:" + event);
}
// This may be called without ever calling conversationOpened
public void conversationClosed(Conversation co)
{
- logger.debug("conversation closed");
+ if (logger.isDebugEnabled())
+ logger.debug("conversation closed");
}
public void gotOtherEvent(Conversation conversation,
ConversationEventInfo event)
{
- logger.debug("goet other event");
+ if (logger.isDebugEnabled())
+ logger.debug("goet other event");
if(event instanceof TypingInfo)
{
TypingInfo ti = (TypingInfo)event;
- logger.debug("got typing info and state is: "
+ if (logger.isDebugEnabled())
+ logger.debug("got typing info and state is: "
+ ti.getTypingState());
}
else if (event instanceof MessageInfo)
{
MessageInfo ti = (MessageInfo)event;
- logger.debug("got message info for msg: " + ti.getMessage());
+ if (logger.isDebugEnabled())
+ logger.debug("got message info for msg: " + ti.getMessage());
}
}
public void canSendMessageChanged(Conversation con, boolean canSend)
{
- logger.debug("can send message event");
+ if (logger.isDebugEnabled())
+ logger.debug("can send message event");
}
// This may never be called
public void conversationOpened(Conversation con)
{
- logger.debug("conversation opened event");
+ if (logger.isDebugEnabled())
+ logger.debug("conversation opened event");
}
// This may be called after conversationClosed is called
public void sentMessage(Conversation con, MessageInfo minfo)
{
- logger.debug("sent message event");
+ if (logger.isDebugEnabled())
+ logger.debug("sent message event");
}
// This may be called after conversationClosed is called.
public void gotMessage(Conversation con, MessageInfo minfo)
{
- logger.debug("got message event"
+ if (logger.isDebugEnabled())
+ logger.debug("got message event"
+ minfo.getMessage().getMessageBody());
}
@@ -973,7 +989,8 @@ public class ProtocolProviderServiceIcqImpl
if (flapCommand instanceof CloseFlapCmd)
{
CloseFlapCmd closeCmd = (CloseFlapCmd)flapCommand;
- logger.trace("received close command with code : "
+ if (logger.isTraceEnabled())
+ logger.trace("received close command with code : "
+ closeCmd.getCode());
aimConnection.disconnect();
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java
index fbd74d6..d2400fd 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java
@@ -181,7 +181,8 @@ public class ServerStoredContactListIcqImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -192,7 +193,8 @@ public class ServerStoredContactListIcqImpl
, icqProvider
, parentOperationSet);
- logger.trace("Will dispatch the following grp event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following grp event: " + evt);
Iterable<ServerStoredGroupListener> listeners;
synchronized (serverStoredGroupListeners)
@@ -233,7 +235,8 @@ public class ServerStoredContactListIcqImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -253,7 +256,8 @@ public class ServerStoredContactListIcqImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -279,7 +283,8 @@ public class ServerStoredContactListIcqImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -300,7 +305,8 @@ public class ServerStoredContactListIcqImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -490,7 +496,8 @@ public class ServerStoredContactListIcqImpl
*/
ContactIcqImpl createVolatileContact(Screenname screenname)
{
- logger.trace("createVolatileContact " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("createVolatileContact " + screenname);
//First create the new volatile contact;
Buddy volatileBuddy = new VolatileBuddy(screenname);
@@ -539,7 +546,8 @@ public class ServerStoredContactListIcqImpl
ContactIcqImpl createUnresolvedContact(ContactGroupIcqImpl parentGroup,
Screenname screenname)
{
- logger.trace("createUnresolvedContact " + screenname);
+ if (logger.isTraceEnabled())
+ logger.trace("createUnresolvedContact " + screenname);
//First create the new volatile contact;
Buddy volatileBuddy = new VolatileBuddy(screenname);
@@ -587,7 +595,8 @@ public class ServerStoredContactListIcqImpl
*/
public void addContact(ContactGroupIcqImpl parent, String screenname)
{
- logger.trace("Adding contact " + screenname
+ if (logger.isTraceEnabled())
+ logger.trace("Adding contact " + screenname
+ " to parent=" + parent.getGroupName());
//if the contact is already in the contact list and is not volatile,
@@ -598,7 +607,8 @@ public class ServerStoredContactListIcqImpl
if( existingContact != null
&& existingContact.isPersistent() )
{
- logger.debug("Contact " + screenname + " already exists. Gen. evt.");
+ if (logger.isDebugEnabled())
+ logger.debug("Contact " + screenname + " already exists. Gen. evt.");
//broadcast the event in a separate thread so that we don't
//block the calling thread.
new Thread(){
@@ -612,7 +622,8 @@ public class ServerStoredContactListIcqImpl
return;
}
- logger.trace("Adding the contact to the specified group.");
+ if (logger.isTraceEnabled())
+ logger.trace("Adding the contact to the specified group.");
//extract the top level group
AddMutableGroup group = parent.getJoustSimSourceGroup();
@@ -625,9 +636,11 @@ public class ServerStoredContactListIcqImpl
*/
public void createGroup(String groupName)
{
- logger.trace("Creating group: " + groupName);
+ if (logger.isTraceEnabled())
+ logger.trace("Creating group: " + groupName);
buddyList.addGroup(groupName);
- logger.trace("Group " +groupName+ " created.");
+ if (logger.isTraceEnabled())
+ logger.trace("Group " +groupName+ " created.");
}
/**
@@ -878,8 +891,10 @@ public class ServerStoredContactListIcqImpl
Group group,
List<? extends Buddy> buddies)
{
- logger.trace("Group added: " + group.getName());
- logger.trace("Buddies: " + buddies);
+ if (logger.isTraceEnabled())
+ logger.trace("Group added: " + group.getName());
+ if (logger.isTraceEnabled())
+ logger.trace("Buddies: " + buddies);
ContactGroupIcqImpl newGroup = findContactGroup(group.getName());
@@ -951,12 +966,14 @@ public class ServerStoredContactListIcqImpl
List<? extends Group> newItems,
Group group)
{
- logger.trace("Group Removed: " + group.getName());
+ if (logger.isTraceEnabled())
+ logger.trace("Group Removed: " + group.getName());
int index = findContactGroupIndex(group);
if (index == -1)
{
- logger.debug("non existing group: " + group.getName());
+ if (logger.isDebugEnabled())
+ logger.debug("non existing group: " + group.getName());
return;
}
@@ -986,7 +1003,8 @@ public class ServerStoredContactListIcqImpl
List<? extends Buddy> newItems,
Buddy buddy)
{
- logger.trace("Received buddyAdded " + buddy);
+ if (logger.isTraceEnabled())
+ logger.trace("Received buddyAdded " + buddy);
//it is possible that the buddy being added is already in our
//contact list. For example if they have sent a message to us they
//would have been added to the local contact list as a
@@ -1002,7 +1020,8 @@ public class ServerStoredContactListIcqImpl
if (parentGroup == null)
{
- logger.debug("no parent group "
+ if (logger.isDebugEnabled())
+ logger.debug("no parent group "
+ joustSimGroup + " found for buddy: " + buddy);
return;
}
@@ -1178,13 +1197,15 @@ public class ServerStoredContactListIcqImpl
public void groupNameChanged(Group group, String oldName,
String newName)
{
- logger.trace("Group name for "+group.getName()+"changed from="
+ if (logger.isTraceEnabled())
+ logger.trace("Group name for "+group.getName()+"changed from="
+ oldName + " to=" + newName);
ContactGroupIcqImpl contactGroup = findContactGroup(group);
if (contactGroup == null)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"group name changed event received for unknown group"
+ group);
return;
@@ -1195,14 +1216,16 @@ public class ServerStoredContactListIcqImpl
//and values of oldName and newName would almost always be null)
if (contactGroup.getGroupName()
.equals( contactGroup.getNameCopy() )){
- logger.trace("Group name hasn't really changed("
+ if (logger.isTraceEnabled())
+ logger.trace("Group name hasn't really changed("
+contactGroup.getGroupName()+"). Ignoring");
return;
}
//we do have a new name. store a copy of it for our next deteciton
//and fire the corresponding event.
- logger.trace("Dispatching group change event.");
+ if (logger.isTraceEnabled())
+ logger.trace("Dispatching group change event.");
contactGroup.initNameCopy();
fireGroupEvent(contactGroup,
@@ -1224,8 +1247,10 @@ public class ServerStoredContactListIcqImpl
Screenname newScreenname)
{
/** @todo implement screennameChanged() */
- logger.debug("/** @todo implement screennameChanged() */=");
- logger.debug("buddy="+buddy);
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement screennameChanged() */=");
+ if (logger.isDebugEnabled())
+ logger.debug("buddy="+buddy);
}
/**
@@ -1239,7 +1264,8 @@ public class ServerStoredContactListIcqImpl
int newAlertAction)
{
/** @todo implement alertActionChanged() */
- logger.debug("/** @todo implement alertActionChanged() */=");
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement alertActionChanged() */=");
}
/**
@@ -1253,7 +1279,8 @@ public class ServerStoredContactListIcqImpl
String newAlertSound)
{
/** @todo implement alertSoundChanged() */
- logger.debug("/** @todo implement alertSoundChanged() */");
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement alertSoundChanged() */");
}
/**
@@ -1267,7 +1294,8 @@ public class ServerStoredContactListIcqImpl
int newAlertEvent)
{
/** @todo implement alertTimeChanged() */
- logger.debug("/** @todo implement alertTimeChanged() */");
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement alertTimeChanged() */");
}
/**
@@ -1280,7 +1308,8 @@ public class ServerStoredContactListIcqImpl
public void aliasChanged(Buddy buddy, String oldAlias, String newAlias)
{
/** @todo implement aliasChanged() */
- logger.debug("/** @todo implement aliasChanged() */");
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement aliasChanged() */");
}
/**
@@ -1294,7 +1323,8 @@ public class ServerStoredContactListIcqImpl
String newComment)
{
/** @todo implement buddyCommentChanged() */
- logger.debug("/** @todo implement buddyCommentChanged() */");
+ if (logger.isDebugEnabled())
+ logger.debug("/** @todo implement buddyCommentChanged() */");
}
public void awaitingAuthChanged(Buddy simpleBuddy,
@@ -1302,7 +1332,8 @@ public class ServerStoredContactListIcqImpl
boolean newAwaitingAuth)
{
/** @todo */
- logger.debug("awaitingAuthChanged for " + simpleBuddy
+ if (logger.isDebugEnabled())
+ logger.debug("awaitingAuthChanged for " + simpleBuddy
+ " oldAwaitingAuth: " + oldAwaitingAuth
+ " newAwaitingAuth: " + newAwaitingAuth);
}
@@ -1319,20 +1350,23 @@ public class ServerStoredContactListIcqImpl
public void handleItemCreated(SsiItem item)
{
/** @todo implement handleItemCreated() */
- logger.debug("!!! TODO: implement handleItemCreated() !!!" + item
+ if (logger.isDebugEnabled())
+ logger.debug("!!! TODO: implement handleItemCreated() !!!" + item
+ " DATA=" + item.getData().toString());
}
public void handleItemDeleted(SsiItem item)
{
/** @todo implement handleItemDeleted() */
- logger.debug("!!! TODO: implement handleItemDeleted()!!!" + item);
+ if (logger.isDebugEnabled())
+ logger.debug("!!! TODO: implement handleItemDeleted()!!!" + item);
}
public void handleItemModified(SsiItem item)
{
/** @todo implement handleItemModified() */
- logger.debug("!!! TODO: implement handleItemModified() !!!" + item
+ if (logger.isDebugEnabled())
+ logger.debug("!!! TODO: implement handleItemModified() !!!" + item
+ " DATA=" + item.getData().toString());
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
index b554e05..849d819 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
@@ -935,7 +935,8 @@ public class ChatRoomIrcImpl
evt = new ChatRoomMemberPresenceChangeEvent(
this, member, eventID, eventReason);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterable<ChatRoomMemberPresenceListener> listeners;
synchronized (memberListeners)
@@ -968,7 +969,8 @@ public class ChatRoomIrcImpl
previousRole,
newRole);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterable<ChatRoomMemberRoleListener> listeners;
synchronized (memberRoleListeners)
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/IrcActivator.java b/src/net/java/sip/communicator/impl/protocol/irc/IrcActivator.java
index f9b3522..952ef86 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/IrcActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/IrcActivator.java
@@ -66,7 +66,8 @@ public class IrcActivator
ircProviderFactory,
hashtable);
- logger.info("IRC protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("IRC protocol implementation [STARTED].");
}
/**
@@ -93,7 +94,8 @@ public class IrcActivator
public void stop(BundleContext context)
throws Exception
{
- logger.info("IRC protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("IRC protocol implementation [STOPPED].");
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java b/src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java
index ce524e1..609ad51 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java
@@ -213,7 +213,8 @@ public class IrcStack
String hostname,
String messageContent)
{
- logger.trace("MESSAGE received in chat room : " + channel
+ if (logger.isTraceEnabled())
+ logger.trace("MESSAGE received in chat room : " + channel
+ ": from " + sender
+ " " + login + "@" + hostname
+ " the message: " + messageContent);
@@ -257,7 +258,8 @@ public class IrcStack
String hostname,
String messageContent)
{
- logger.trace("PRIVATE MESSAGE received from " + sender
+ if (logger.isTraceEnabled())
+ logger.trace("PRIVATE MESSAGE received from " + sender
+ " " + login + "@" + hostname
+ " the message: " + messageContent);
@@ -315,7 +317,8 @@ public class IrcStack
String target,
String action)
{
- logger.trace("ACTION on " + target + " : Received from " + sender
+ if (logger.isTraceEnabled())
+ logger.trace("ACTION on " + target + " : Received from " + sender
+ " " + login + "@" + hostname + " the action: " + action);
MessageIrcImpl actionMessage = new MessageIrcImpl(
@@ -379,7 +382,8 @@ public class IrcStack
String sourceHostname,
String recipient)
{
- logger.trace("DEOP on " + channel + ": Received from " + sourceNick
+ if (logger.isTraceEnabled())
+ logger.trace("DEOP on " + channel + ": Received from " + sourceNick
+ " " + sourceLogin + "@" + sourceHostname + "on " + recipient);
ChatRoomIrcImpl chatRoom = ircMUCOpSet.getChatRoom(channel);
@@ -445,7 +449,8 @@ public class IrcStack
String sourceHostname,
String channel)
{
- logger.trace("INVITE on " + channel + ": Received from "
+ if (logger.isTraceEnabled())
+ logger.trace("INVITE on " + channel + ": Received from "
+ sourceNick + " " + sourceLogin + "@" + sourceHostname);
ChatRoom targetChatRoom = ircMUCOpSet.findRoom(channel);
@@ -470,7 +475,8 @@ public class IrcStack
String login,
String hostname)
{
- logger.trace("JOIN on " + channel + ": Received from " + sender
+ if (logger.isTraceEnabled())
+ logger.trace("JOIN on " + channel + ": Received from " + sender
+ " " + login + "@" + hostname);
ChatRoomIrcImpl chatRoom
@@ -528,7 +534,8 @@ public class IrcStack
String recipientNick,
String reason)
{
- logger.trace("KICK on " + channel
+ if (logger.isTraceEnabled())
+ logger.trace("KICK on " + channel
+ ": Received from " + kickerNick
+ " " + kickerLogin + "@" + kickerHostname);
@@ -579,7 +586,8 @@ public class IrcStack
String hostname,
String newNick)
{
- logger.trace("NICK changed: from " + oldNick + " changed to "
+ if (logger.isTraceEnabled())
+ logger.trace("NICK changed: from " + oldNick + " changed to "
+ newNick);
this.notifyChatRoomOperation(0);
@@ -626,7 +634,8 @@ public class IrcStack
String target,
String notice)
{
- logger.trace("NOTICE on " + target + ": Received from "
+ if (logger.isTraceEnabled())
+ logger.trace("NOTICE on " + target + ": Received from "
+ sourceNick + " " + sourceLogin + "@" + sourceHostname
+ " the message: " + notice);
@@ -1216,7 +1225,8 @@ public class IrcStack
&& code != RPL_LISTEND
&& code != RPL_ENDOFNAMES)
{
- logger.trace(
+ if (logger.isTraceEnabled())
+ logger.trace(
"Server response: Code : "
+ code
+ " Response : "
@@ -1464,7 +1474,8 @@ public class IrcStack
long date,
boolean changed)
{
- logger.trace("TOPIC on " + channel + ": " + topic + " setBy: "
+ if (logger.isTraceEnabled())
+ logger.trace("TOPIC on " + channel + ": " + topic + " setBy: "
+ setBy + " on: " + date);
this.notifyChatRoomOperation(0);
@@ -1493,7 +1504,8 @@ public class IrcStack
*/
protected void onUnknown(String line)
{
- logger.trace("Unknown message received from the server : " + line);
+ if (logger.isTraceEnabled())
+ logger.trace("Unknown message received from the server : " + line);
}
/**
@@ -1795,7 +1807,8 @@ public class IrcStack
if((chatRoom == null) || !chatRoom.isJoined())
return;
- logger.trace("WHOIS on: " + userInfo.getNickName() + "!"
+ if (logger.isTraceEnabled())
+ logger.trace("WHOIS on: " + userInfo.getNickName() + "!"
+ userInfo.getLogin() + "@" + userInfo.getHostname());
String whoisMessage
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
index 86cd780..a41dd9f 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
@@ -63,7 +63,8 @@ public class ProtocolProviderServiceIrcImpl
*/
public ProtocolProviderServiceIrcImpl()
{
- logger.trace("Creating a irc provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a irc provider.");
}
/**
@@ -229,7 +230,8 @@ public class ProtocolProviderServiceIrcImpl
{
return;
}
- logger.trace("Killing the Irc Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Irc Protocol Provider.");
if(isRegistered())
{
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ActiveCallsRepository.java b/src/net/java/sip/communicator/impl/protocol/jabber/ActiveCallsRepository.java
index 49fbdb9..2c0da88 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ActiveCallsRepository.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ActiveCallsRepository.java
@@ -76,7 +76,8 @@ public class ActiveCallsRepository
CallJabberImpl sourceCall = this.activeCalls
.remove(evt.getSourceCall().getCallID());
- logger.trace( "Removing call " + sourceCall + " from the list of "
+ if (logger.isTraceEnabled())
+ logger.trace( "Removing call " + sourceCall + " from the list of "
+ "active calls because it entered an ENDED state");
this.parentOperationSet.fireCallEvent(
@@ -109,14 +110,16 @@ public class ActiveCallsRepository
if(session == null)
{
- logger.debug("Cannot find a peer with a null session. "
+ if (logger.isDebugEnabled())
+ logger.debug("Cannot find a peer with a null session. "
+"Returning null");
return null;
}
if(logger.isTraceEnabled())
{
- logger.trace("Looking for peer with session: " + session
+ if (logger.isTraceEnabled())
+ logger.trace("Looking for peer with session: " + session
+ " among " + this.activeCalls.size() + " calls");
}
@@ -146,14 +149,16 @@ public class ActiveCallsRepository
if(session == null)
{
- logger.debug("Cannot find a peer with a null session. "
+ if (logger.isDebugEnabled())
+ logger.debug("Cannot find a peer with a null session. "
+ "Returning null");
return null;
}
if(logger.isTraceEnabled())
{
- logger.trace("Looking for peer with session: " + session
+ if (logger.isTraceEnabled())
+ logger.trace("Looking for peer with session: " + session
+ " among " + this.activeCalls.size() + " calls");
}
@@ -164,7 +169,8 @@ public class ActiveCallsRepository
if(callPeer != null)
{
- logger.trace("Returning peer " + callPeer);
+ if (logger.isTraceEnabled())
+ logger.trace("Returning peer " + callPeer);
return callPeer;
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java
index 94ef0e5..9037245 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java
@@ -205,7 +205,8 @@ public class CallJabberImpl
if(logger.isTraceEnabled())
{
- logger.trace("Looking for peer with session: " + session
+ if (logger.isTraceEnabled())
+ logger.trace("Looking for peer with session: " + session
+ "among " + this.callPeers.size() + " calls");
}
@@ -217,12 +218,14 @@ public class CallJabberImpl
if( cp.getJingleSession() == session)
{
- logger.trace("Returing cp="+cp);
+ if (logger.isTraceEnabled())
+ logger.trace("Returing cp="+cp);
return cp;
}
else
{
- logger.trace("Ignoring cp="+cp
+ if (logger.isTraceEnabled())
+ logger.trace("Ignoring cp="+cp
+ " because cp.jingleSession="+cp.getJingleSession()
+ " while session="+session);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomConfigurationFormJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomConfigurationFormJabberImpl.java
index 8f63bad..92871c2 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomConfigurationFormJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomConfigurationFormJabberImpl.java
@@ -97,7 +97,8 @@ public class ChatRoomConfigurationFormJabberImpl
public void submit()
throws OperationFailedException
{
- logger.trace("Sends chat room configuration form to the server.");
+ if (logger.isTraceEnabled())
+ logger.trace("Sends chat room configuration form to the server.");
try
{
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java
index 865cf83..6b4b29e 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java
@@ -873,7 +873,8 @@ public class ChatRoomJabberImpl
*/
public void banned(String participant, String actor, String reason)
{
- logger.info(participant + " has been banned from "
+ if (logger.isInfoEnabled())
+ logger.info(participant + " has been banned from "
+ getName() + " chat room.");
ChatRoomMember member = smackParticipantToScMember(participant);
@@ -941,7 +942,8 @@ public class ChatRoomJabberImpl
*/
public void joined(String participant)
{
- logger.info(participant + " has joined the "
+ if (logger.isInfoEnabled())
+ logger.info(participant + " has joined the "
+ getName() + " chat room.");
String participantName = StringUtils.parseResource(participant);
@@ -980,7 +982,8 @@ public class ChatRoomJabberImpl
*/
public void left(String participant)
{
- logger.info(participant + " has left the "
+ if (logger.isInfoEnabled())
+ logger.info(participant + " has left the "
+ getName() + " chat room.");
ChatRoomMember member
@@ -1418,7 +1421,8 @@ public class ChatRoomJabberImpl
= new ChatRoomMemberPresenceChangeEvent(
this, member, eventID, eventReason);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterator<ChatRoomMemberPresenceListener> listeners = null;
synchronized (memberListeners)
@@ -1454,7 +1458,8 @@ public class ChatRoomJabberImpl
= new ChatRoomMemberPresenceChangeEvent(
this, member, actor, eventID, eventReason);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterable<ChatRoomMemberPresenceListener> listeners;
synchronized (memberListeners)
@@ -1485,7 +1490,8 @@ public class ChatRoomJabberImpl
= new ChatRoomMemberRoleChangeEvent(
this, member, previousRole, newRole);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterable<ChatRoomMemberRoleListener> listeners;
synchronized (memberRoleListeners)
@@ -1588,7 +1594,8 @@ public class ChatRoomJabberImpl
if(logger.isDebugEnabled())
{
- logger.debug("Received from "
+ if (logger.isDebugEnabled())
+ logger.debug("Received from "
+ fromUserName
+ " the message "
+ msg.toXML());
@@ -1598,7 +1605,8 @@ public class ChatRoomJabberImpl
if(msg.getType() == org.jivesoftware.smack.packet.Message.Type.error)
{
- logger.info("Message error received from " + fromUserName);
+ if (logger.isInfoEnabled())
+ logger.info("Message error received from " + fromUserName);
int errorCode = packet.getError().getCode();
int errorResultCode
@@ -1821,7 +1829,8 @@ public class ChatRoomJabberImpl
= new ChatRoomLocalUserRoleChangeEvent(
this, previousRole, newRole);
- logger.trace("Will dispatch the following ChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following ChatRoom event: " + evt);
Iterable<ChatRoomLocalUserRoleListener> listeners;
synchronized (localUserRoleListeners)
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/IncomingFileTransferRequestJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/IncomingFileTransferRequestJabberImpl.java
index 5b5d9b4..faa325e 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/IncomingFileTransferRequestJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/IncomingFileTransferRequestJabberImpl.java
@@ -154,7 +154,8 @@ public class IncomingFileTransferRequestJabberImpl
}
catch (XMPPException e)
{
- logger.debug("Receiving file failed.", e);
+ if (logger.isDebugEnabled())
+ logger.debug("Receiving file failed.", e);
}
return incomingTransfer;
@@ -221,7 +222,8 @@ public class IncomingFileTransferRequestJabberImpl
if (!(packet instanceof ThumbnailIQ))
return;
- logger.debug("Thumbnail response received.");
+ if (logger.isDebugEnabled())
+ logger.debug("Thumbnail response received.");
ThumbnailIQ thumbnailResponse = (ThumbnailIQ) packet;
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
index 2b5a931..acd08db 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
@@ -384,7 +384,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
msg.setTo(toJID);
- logger.trace("Will send a message to:" + toJID
+ if (logger.isTraceEnabled())
+ logger.trace("Will send a message to:" + toJID
+ " chat.jid=" + chat.getParticipant()
+ " chat.tid=" + chat.getThreadID());
@@ -487,7 +488,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -565,7 +567,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
if(logger.isDebugEnabled())
{
- logger.debug("Received from "
+ if (logger.isDebugEnabled())
+ logger.debug("Received from "
+ fromUserID
+ " the message "
+ msg.toXML());
@@ -614,7 +617,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
if(msg.getType()
== org.jivesoftware.smack.packet.Message.Type.error)
{
- logger.info("Message error received from " + fromUserID);
+ if (logger.isInfoEnabled())
+ logger.info("Message error received from " + fromUserID);
int errorCode = packet.getError().getCode();
int errorResultCode = MessageDeliveryFailedEvent.UNKNOWN_ERROR;
@@ -649,13 +653,15 @@ public class OperationSetBasicInstantMessagingJabberImpl
//that they contacted us from.
putJidForAddress(fromUserID, msg.getFrom());
- logger.trace("just mapped: " + fromUserID + " to " + msg.getFrom());
+ if (logger.isTraceEnabled())
+ logger.trace("just mapped: " + fromUserID + " to " + msg.getFrom());
// In the second condition we filter all group chat messages,
// because they are managed by the multi user chat operation set.
if(sourceContact == null)
{
- logger.debug("received a message from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a message from an unknown contact: "
+ fromUserID);
//create the volatile contact
sourceContact = opSetPersPresence
@@ -695,7 +701,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
if(logger.isDebugEnabled())
{
- logger.debug("Received keepAliveEvent from "
+ if (logger.isDebugEnabled())
+ logger.debug("Received keepAliveEvent from "
+ keepAliveEvent.getFromUserID()
+ " the message : "
+ keepAliveEvent.toXML());
@@ -720,7 +727,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
// if we are not registerd do nothing
if(!jabberProvider.isRegistered())
{
- logger.trace("provider not registered. "
+ if (logger.isTraceEnabled())
+ logger.trace("provider not registered. "
+"won't send keep alive. acc.id="
+ jabberProvider.getAccountID()
.getAccountUniqueID());
@@ -738,7 +746,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
keepAliveTimer.schedule(
new KeepAliveCheckTask(), KEEPALIVE_WAIT);
- logger.trace(
+ if (logger.isTraceEnabled())
+ logger.trace(
"send keepalive for acc: "
+ jabberProvider.getAccountID().getAccountUniqueID());
@@ -862,13 +871,15 @@ public class OperationSetBasicInstantMessagingJabberImpl
if (!notificationsAreSupported)
{
- logger.debug(jabberProvider.getAccountID().getService()
+ if (logger.isDebugEnabled())
+ logger.debug(jabberProvider.getAccountID().getService()
+" does not seem to provide a GMail notification "
+" service so we won't be trying to subscribe for it");
return;
}
- logger.debug(jabberProvider.getAccountID().getService()
+ if (logger.isDebugEnabled())
+ logger.debug(jabberProvider.getAccountID().getService()
+" seems to provide a GMail notification "
+" service so we will try to subscribe for it");
@@ -894,7 +905,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
//create a query with -1 values for newer-than-tid and
//newer-than-time attributes
MailboxQueryIQ mailboxQuery = new MailboxQueryIQ();
- logger.trace("sending mailNotification for acc: "
+ if (logger.isTraceEnabled())
+ logger.trace("sending mailNotification for acc: "
+ jabberProvider.getAccountID().getAccountUniqueID());
jabberProvider.getConnection().sendPacket(mailboxQuery);
@@ -949,7 +961,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
}
catch (NumberFormatException e)
{
- logger.debug("Failed to parse max threads count: "+maxThreads
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to parse max threads count: "+maxThreads
+". Going for default.");
}
@@ -1058,7 +1071,8 @@ public class OperationSetBasicInstantMessagingJabberImpl
mailboxQueryIQ.setNewerThanTime(
lastReceivedMailboxResultTime);
- logger.trace(
+ if (logger.isTraceEnabled())
+ logger.trace(
"send mailNotification for acc: "
+ jabberProvider.getAccountID().getAccountUniqueID());
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
index df88638..15d4ea2 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
@@ -112,7 +112,8 @@ public class OperationSetBasicTelephonyJabberImpl
jingleManager.addCreationListener(this);
jingleManager.addJingleSessionRequestListener(this);
- logger.info("Jingle : ON ");
+ if (logger.isInfoEnabled())
+ logger.info("Jingle : ON ");
}
else if ((evt.getNewState() == RegistrationState.UNREGISTERED))
{
@@ -122,7 +123,8 @@ public class OperationSetBasicTelephonyJabberImpl
jingleManager.removeJingleSessionRequestListener(this);
jingleManager = null;
- logger.info("Jingle : OFF ");
+ if (logger.isInfoEnabled())
+ logger.info("Jingle : OFF ");
}
}
}
@@ -187,7 +189,8 @@ public class OperationSetBasicTelephonyJabberImpl
{
OutgoingJingleSession outJS;
- logger.info("creating outgoing call...");
+ if (logger.isInfoEnabled())
+ logger.info("creating outgoing call...");
if (protocolProvider.getConnection() == null) {
throw new OperationFailedException(
"Failed to create OutgoingJingleSession.\n"
@@ -226,11 +229,13 @@ public class OperationSetBasicTelephonyJabberImpl
.discoverInfo(fullCalleeURI);
if (di.containsFeature("http://www.xmpp.org/extensions/xep-0166.html#ns"))
{
- logger.info(fullCalleeURI + ": jingle supported ");
+ if (logger.isInfoEnabled())
+ logger.info(fullCalleeURI + ": jingle supported ");
}
else
{
- logger.info(calleeAddress + ": jingle not supported ??? ");
+ if (logger.isInfoEnabled())
+ logger.info(calleeAddress + ": jingle not supported ??? ");
//
// throw new OperationFailedException(
// "Failed to create OutgoingJingleSession.\n"
@@ -371,7 +376,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void shutdown()
{
- logger.trace("Ending all active calls. ");
+ if (logger.isTraceEnabled())
+ logger.trace("Ending all active calls. ");
Iterator<CallJabberImpl> activeCalls
= this.activeCallsRepository.getActiveCalls();
@@ -410,7 +416,8 @@ public class OperationSetBasicTelephonyJabberImpl
public void sessionRequested(JingleSessionRequest jingleSessionRequest)
{
IncomingJingleSession inJS;
- logger.info("session requested ");
+ if (logger.isInfoEnabled())
+ logger.info("session requested ");
try
{
inJS = jingleSessionRequest.accept();
@@ -449,7 +456,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void sessionCreated(JingleSession jingleSession)
{
- logger.info("session created : " + jingleSession);
+ if (logger.isInfoEnabled())
+ logger.info("session created : " + jingleSession);
jingleSession.addListener(this);
jingleSession.addMediaListener(this);
@@ -464,7 +472,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void mediaClosed(PayloadType payloadType)
{
- logger.info(" media closed ");
+ if (logger.isInfoEnabled())
+ logger.info(" media closed ");
}
/**
@@ -474,7 +483,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void mediaEstablished(PayloadType payloadType)
{
- logger.info("media established ");
+ if (logger.isInfoEnabled())
+ logger.info("media established ");
}
/**
@@ -485,7 +495,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void transportClosed(TransportCandidate transportCandidate)
{
- logger.info("transport closed ");
+ if (logger.isInfoEnabled())
+ logger.info("transport closed ");
}
/**
@@ -507,7 +518,8 @@ public class OperationSetBasicTelephonyJabberImpl
public void transportEstablished(TransportCandidate local,
TransportCandidate remote)
{
- logger.info("transport established " + local + " -:- " + remote);
+ if (logger.isInfoEnabled())
+ logger.info("transport established " + local + " -:- " + remote);
}
/**
@@ -582,7 +594,8 @@ public class OperationSetBasicTelephonyJabberImpl
activeCallsRepository.findCallPeer(session);
if (callPeer == null)
{
- logger.debug("Received a stray trying response.");
+ if (logger.isDebugEnabled())
+ logger.debug("Received a stray trying response.");
return;
}
try
@@ -606,7 +619,8 @@ public class OperationSetBasicTelephonyJabberImpl
public void afterChanged(JingleNegotiator.State oldState,
JingleNegotiator.State newState)
{
- logger.info("session state changed : " + oldState + " => " + newState);
+ if (logger.isInfoEnabled())
+ logger.info("session state changed : " + oldState + " => " + newState);
}
/**
@@ -623,7 +637,8 @@ public class OperationSetBasicTelephonyJabberImpl
TransportCandidate localCandidate,
JingleSession jingleSession)
{
- logger.info("session established ");
+ if (logger.isInfoEnabled())
+ logger.info("session established ");
}
/**
@@ -634,7 +649,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void sessionDeclined(String reason, JingleSession jingleSession)
{
- logger.info("session declined : " + reason);
+ if (logger.isInfoEnabled())
+ logger.info("session declined : " + reason);
}
/**
@@ -646,7 +662,8 @@ public class OperationSetBasicTelephonyJabberImpl
public void sessionRedirected(String redirection,
JingleSession jingleSession)
{
- logger.info("session redirected : " + redirection);
+ if (logger.isInfoEnabled())
+ logger.info("session redirected : " + redirection);
}
/**
@@ -657,7 +674,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void sessionClosed(String reason, JingleSession jingleSession)
{
- logger.info("session closed : " + reason);
+ if (logger.isInfoEnabled())
+ logger.info("session closed : " + reason);
}
/**
@@ -680,7 +698,8 @@ public class OperationSetBasicTelephonyJabberImpl
*/
public void sessionMediaReceived(JingleSession jingleSession, String peer)
{
- logger.info("session media received ");
+ if (logger.isInfoEnabled())
+ logger.info("session media received ");
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java
index 52bf59f..74f3d8f 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java
@@ -259,7 +259,8 @@ public class OperationSetFileTransferJabberImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -331,7 +332,8 @@ public class OperationSetFileTransferJabberImpl
if (!(packet instanceof StreamInitiation))
return;
- logger.debug("Incoming Jabber file transfer request.");
+ if (logger.isDebugEnabled())
+ logger.debug("Incoming Jabber file transfer request.");
StreamInitiation streamInitiation = (StreamInitiation) packet;
@@ -368,7 +370,8 @@ public class OperationSetFileTransferJabberImpl
thumbnailElement.getCid(),
IQ.Type.GET);
- logger.debug("Sending thumbnail request:"
+ if (logger.isDebugEnabled())
+ logger.debug("Sending thumbnail request:"
+ thumbnailRequest.toXML());
jabberProvider.getConnection().sendPacket(thumbnailRequest);
@@ -541,7 +544,8 @@ public class OperationSetFileTransferJabberImpl
}
catch (InterruptedException e)
{
- logger.debug("Unable to sleep thread.", e);
+ if (logger.isDebugEnabled())
+ logger.debug("Unable to sleep thread.", e);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java
index f74998b..e31d52a 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetGeolocationJabberImpl.java
@@ -162,7 +162,8 @@ public class OperationSetGeolocationJabberImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The Jabber provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The Jabber provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -226,7 +227,8 @@ public class OperationSetGeolocationJabberImpl
if (geolocExt != null)
{
- logger.debug("GeolocationExtension found from " + from + ":" +
+ if (logger.isDebugEnabled())
+ logger.debug("GeolocationExtension found from " + from + ":" +
geolocExt.toXML());
Map<String, String> newGeolocation
@@ -248,7 +250,8 @@ public class OperationSetGeolocationJabberImpl
String sourceContact,
Map<String, String> newGeolocation)
{
- logger.debug("Trying to dispatch geolocation contact update for "
+ if (logger.isDebugEnabled())
+ logger.debug("Trying to dispatch geolocation contact update for "
+ sourceContact);
Contact source = opsetprez.findContactByID(sourceContact);
@@ -260,7 +263,8 @@ public class OperationSetGeolocationJabberImpl
, newGeolocation
, OperationSetGeolocationJabberImpl.this);
- logger.debug("Dispatching geolocation contact update. Listeners="
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching geolocation contact update. Listeners="
+ geolocationContactsListeners.size()
+ " evt=" + evt);
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetMultiUserChatJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetMultiUserChatJabberImpl.java
index c603c5e..1eee4f7 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetMultiUserChatJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetMultiUserChatJabberImpl.java
@@ -105,7 +105,8 @@ public class OperationSetMultiUserChatJabberImpl
if (room == null)
{
- logger.info("Find room returns null.");
+ if (logger.isInfoEnabled())
+ logger.info("Find room returns null.");
MultiUserChat muc = new MultiUserChat(
getXmppConnection(), getCanonicalRoomName(roomName));
@@ -651,7 +652,8 @@ public class OperationSetMultiUserChatJabberImpl
{
if (evt.getNewState() == RegistrationState.REGISTERED)
{
- logger.debug("adding an Invitation listener to the smack muc");
+ if (logger.isDebugEnabled())
+ logger.debug("adding an Invitation listener to the smack muc");
MultiUserChat.addInvitationListener(
jabberProvider.getConnection(),
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
index 30e6082..a71aef0 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
@@ -750,7 +750,8 @@ public class OperationSetPersistentPresenceJabberImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The Jabber provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The Jabber provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -852,7 +853,8 @@ public class OperationSetPersistentPresenceJabberImpl
{
String userID =
StringUtils.parseBareAddress(presence.getFrom());
- logger.info("Received a status update for buddy=" + userID);
+ if (logger.isInfoEnabled())
+ logger.info("Received a status update for buddy=" + userID);
// all contact statuses that are received from all its resources
// ordered by priority
@@ -948,7 +950,8 @@ public class OperationSetPersistentPresenceJabberImpl
ContactGroup parent
= ssContactList.findContactGroup(sourceContact);
- logger.debug("Will Dispatch the contact status event.");
+ if (logger.isDebugEnabled())
+ logger.debug("Will Dispatch the contact status event.");
fireContactPresenceStatusChangeEvent(sourceContact, parent,
oldStatus, newStatus);
}
@@ -990,7 +993,8 @@ public class OperationSetPersistentPresenceJabberImpl
if (presenceType == Presence.Type.subscribe)
{
- logger.trace(fromID + " wants to add you to its contact list");
+ if (logger.isTraceEnabled())
+ logger.trace(fromID + " wants to add you to its contact list");
// buddy want to add you to its roster
ContactJabberImpl srcContact
@@ -1009,12 +1013,14 @@ public class OperationSetPersistentPresenceJabberImpl
.equals(AuthorizationResponse.ACCEPT))
{
responsePresenceType = Presence.Type.subscribed;
- logger.info("Sending Accepted Subscription");
+ if (logger.isInfoEnabled())
+ logger.info("Sending Accepted Subscription");
}
else
{
responsePresenceType = Presence.Type.unsubscribed;
- logger.info("Sending Rejected Subscription");
+ if (logger.isInfoEnabled())
+ logger.info("Sending Rejected Subscription");
}
Presence responsePacket = new Presence(responsePresenceType);
@@ -1025,7 +1031,8 @@ public class OperationSetPersistentPresenceJabberImpl
}
else if (presenceType == Presence.Type.unsubscribed)
{
- logger.trace(fromID + " does not allow your subscription");
+ if (logger.isTraceEnabled())
+ logger.trace(fromID + " does not allow your subscription");
ContactJabberImpl contact
= ssContactList.findContactById(fromID);
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java
index d63dbeb..fac27e2 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java
@@ -142,7 +142,8 @@ public class OperationSetTypingNotificationsJabberImpl
*/
private void sendXep85ChatState(Contact contact, int state)
{
- logger.trace("Sending XEP-0085 chat state=" + state
+ if (logger.isTraceEnabled())
+ logger.trace("Sending XEP-0085 chat state=" + state
+ " to " + contact.getAddress());
Chat chat = parentProvider.getConnection()
@@ -222,7 +223,8 @@ public class OperationSetTypingNotificationsJabberImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
if (evt.getNewState() == RegistrationState.REGISTERED)
@@ -269,7 +271,8 @@ public class OperationSetTypingNotificationsJabberImpl
*/
public void chatCreated(Chat chat, boolean isLocal)
{
- logger.trace("Created a chat with "
+ if (logger.isTraceEnabled())
+ logger.trace("Created a chat with "
+ chat.getParticipant() + " local="+isLocal);
if(smackChatStateListener == null)
@@ -376,7 +379,8 @@ public class OperationSetTypingNotificationsJabberImpl
*/
public void stateChanged(Chat chat, ChatState state)
{
- logger.trace(chat.getParticipant() + " entered the "
+ if (logger.isTraceEnabled())
+ logger.trace(chat.getParticipant() + " entered the "
+ state.name()+ " state.");
String fromID = StringUtils.parseBareAddress(chat.getParticipant());
@@ -414,7 +418,8 @@ public class OperationSetTypingNotificationsJabberImpl
public void processMessage(Chat chat,
org.jivesoftware.smack.packet.Message msg)
{
- logger.trace("ignoring a process message");
+ if (logger.isTraceEnabled())
+ logger.trace("ignoring a process message");
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java
index 23e4779..1bc5b48 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetWhiteboardingJabberImpl.java
@@ -394,7 +394,8 @@ public class OperationSetWhiteboardingJabberImpl
if (sourceContact == null)
{
- logger.debug("Received a message from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("Received a message from an unknown contact: "
+ fromUserID);
//create the volatile contact
@@ -442,7 +443,8 @@ public class OperationSetWhiteboardingJabberImpl
= new WhiteboardInvitationReceivedEvent(this, invitation,
new Date(System.currentTimeMillis()));
- logger.debug("Dispatching a WhiteboardInvitation event to "
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching a WhiteboardInvitation event to "
+ invitationListeners.size() + " listeners. event is: "
+ evt.toString());
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OutgoingFileTransferJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OutgoingFileTransferJabberImpl.java
index 8543cde..7be6be5 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OutgoingFileTransferJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OutgoingFileTransferJabberImpl.java
@@ -174,7 +174,8 @@ public class OutgoingFileTransferJabberImpl
if (!(file instanceof ThumbnailedFile))
return;
- logger.debug("File transfer packet intercepted"
+ if (logger.isDebugEnabled())
+ logger.debug("File transfer packet intercepted"
+ " in order to add thumbnail.");
StreamInitiation fileTransferPacket = (StreamInitiation) packet;
@@ -197,7 +198,8 @@ public class OutgoingFileTransferJabberImpl
fileTransferPacket.setFile(fileElement);
- logger.debug("The file transfer packet with thumbnail: "
+ if (logger.isDebugEnabled())
+ logger.debug("The file transfer packet with thumbnail: "
+ fileTransferPacket.toXML());
// Add the request listener in order to listen for requests coming
@@ -243,7 +245,8 @@ public class OutgoingFileTransferJabberImpl
thumbnailedFile.getThumbnailData(),
IQ.Type.RESULT);
- logger.debug("Send thumbnail response to the receiver: "
+ if (logger.isDebugEnabled())
+ logger.debug("Send thumbnail response to the receiver: "
+ thumbnailResponse.toXML());
protocolProvider.getConnection()
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
index 97b1cb7..df51aa2 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
@@ -215,7 +215,8 @@ public class ProtocolProviderServiceJabberImpl
{
try
{
- logger.trace("Trying to reregister us!");
+ if (logger.isTraceEnabled())
+ logger.trace("Trying to reregister us!");
// sets this if any is tring to use us through registration
// to know we are not registered
@@ -826,7 +827,8 @@ public class ProtocolProviderServiceJabberImpl
{
synchronized(initializationLock)
{
- logger.trace("Killing the Jabber Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Jabber Protocol Provider.");
//kill all active calls
OperationSetBasicTelephonyJabberImpl telephony
@@ -998,7 +1000,8 @@ public class ProtocolProviderServiceJabberImpl
*/
public void reconnectingIn(int i)
{
- logger.info("reconnectingIn " + i);
+ if (logger.isInfoEnabled())
+ logger.info("reconnectingIn " + i);
}
/**
@@ -1006,7 +1009,8 @@ public class ProtocolProviderServiceJabberImpl
*/
public void reconnectionSuccessful()
{
- logger.info("reconnectionSuccessful");
+ if (logger.isInfoEnabled())
+ logger.info("reconnectionSuccessful");
}
/**
@@ -1017,7 +1021,8 @@ public class ProtocolProviderServiceJabberImpl
*/
public void reconnectionFailed(Exception exception)
{
- logger.info("reconnectionFailed ", exception);
+ if (logger.isInfoEnabled())
+ logger.info("reconnectionFailed ", exception);
}
}
@@ -1073,7 +1078,8 @@ public class ProtocolProviderServiceJabberImpl
}
catch (XMPPException e)
{
- logger.debug("Failed to discover info.", e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to discover info.", e);
}
return isFeatureListSupported;
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java
index 49139b6..a864529 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java
@@ -139,7 +139,8 @@ public class ServerStoredContactListJabberImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -150,7 +151,8 @@ public class ServerStoredContactListJabberImpl
, jabberProvider
, parentOperationSet);
- logger.trace("Will dispatch the following grp event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following grp event: " + evt);
Iterable<ServerStoredGroupListener> listeners;
synchronized (serverStoredGroupListeners)
@@ -205,10 +207,12 @@ public class ServerStoredContactListJabberImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
- logger.trace("Removing " + contact.getAddress()
+ if (logger.isTraceEnabled())
+ logger.trace("Removing " + contact.getAddress()
+ " from " + parentGroup.getGroupName());
// dispatch
@@ -230,7 +234,8 @@ public class ServerStoredContactListJabberImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -375,7 +380,8 @@ public class ServerStoredContactListJabberImpl
public void addContact(ContactGroup parent, String id)
throws OperationFailedException
{
- logger.trace("Adding contact " + id + " to parent=" + parent);
+ if (logger.isTraceEnabled())
+ logger.trace("Adding contact " + id + " to parent=" + parent);
//if the contact is already in the contact list and is not volatile,
//then only broadcast an event
@@ -512,13 +518,15 @@ public class ServerStoredContactListJabberImpl
public void createGroup(String groupName)
throws OperationFailedException
{
- logger.trace("Creating group: " + groupName);
+ if (logger.isTraceEnabled())
+ logger.trace("Creating group: " + groupName);
ContactGroupJabberImpl existingGroup = findContactGroup(groupName);
if( existingGroup != null && existingGroup.isPersistent() )
{
- logger.debug("ContactGroup " + groupName + " already exists.");
+ if (logger.isDebugEnabled())
+ logger.debug("ContactGroup " + groupName + " already exists.");
throw new OperationFailedException(
"ContactGroup " + groupName + " already exists.",
OperationFailedException.CONTACT_GROUP_ALREADY_EXISTS);
@@ -535,7 +543,8 @@ public class ServerStoredContactListJabberImpl
fireGroupEvent(newGroup, ServerStoredGroupEvent.GROUP_CREATED_EVENT);
- logger.trace("Group " +groupName+ " created.");
+ if (logger.isTraceEnabled())
+ logger.trace("Group " +groupName+ " created.");
}
/**
@@ -741,7 +750,8 @@ public class ServerStoredContactListJabberImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -770,7 +780,8 @@ public class ServerStoredContactListJabberImpl
{
//bail out if no one's listening
if(parentOperationSet == null){
- logger.debug("No presence op. set available. Bailing out.");
+ if (logger.isDebugEnabled())
+ logger.debug("No presence op. set available. Bailing out.");
return;
}
@@ -808,7 +819,8 @@ public class ServerStoredContactListJabberImpl
*/
public void entriesAdded(Collection<String> addresses)
{
- logger.trace("entriesAdded " + addresses);
+ if (logger.isTraceEnabled())
+ logger.trace("entriesAdded " + addresses);
for (String id : addresses)
{
@@ -860,7 +872,8 @@ public class ServerStoredContactListJabberImpl
*/
public void entriesUpdated(Collection<String> addresses)
{
- logger.trace("entriesUpdated " + addresses);
+ if (logger.isTraceEnabled())
+ logger.trace("entriesUpdated " + addresses);
// will search for group renamed
for (String contactID : addresses)
@@ -932,13 +945,15 @@ public class ServerStoredContactListJabberImpl
while (iter.hasNext())
{
String address = iter.next();
- logger.trace("entry deleted " + address);
+ if (logger.isTraceEnabled())
+ logger.trace("entry deleted " + address);
ContactJabberImpl contact = findContactById(address);
if(contact == null)
{
- logger.trace("Could not find contact for deleted entry:"
+ if (logger.isTraceEnabled())
+ logger.trace("Could not find contact for deleted entry:"
+ address);
continue;
}
@@ -947,7 +962,8 @@ public class ServerStoredContactListJabberImpl
if(group == null)
{
- logger.trace("Could not find ParentGroup for deleted entry:"
+ if (logger.isTraceEnabled())
+ logger.trace("Could not find ParentGroup for deleted entry:"
+ address);
continue;
}
@@ -1098,7 +1114,8 @@ public class ServerStoredContactListJabberImpl
}
catch (Exception exc)
{
- logger.debug("Cannot load image for contact "
+ if (logger.isDebugEnabled())
+ logger.debug("Cannot load image for contact "
+ this + " : " + exc.getMessage()
, exc);
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/UriHandlerJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/UriHandlerJabberImpl.java
index a69a4b5..0a22fba 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/UriHandlerJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/UriHandlerJabberImpl.java
@@ -288,7 +288,8 @@ public class UriHandlerJabberImpl
catch (OperationFailedException exc)
{
// The operation has been canceled by the user. Bail out.
- logger.trace("User canceled handling of uri " + uri);
+ if (logger.isTraceEnabled())
+ logger.trace("User canceled handling of uri " + uri);
return;
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardParticipantJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardParticipantJabberImpl.java
index 84455b0..5321964 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardParticipantJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardParticipantJabberImpl.java
@@ -353,7 +353,8 @@ public class WhiteboardParticipantJabberImpl
new WhiteboardParticipantChangeEvent(this, eventType, oldValue,
newValue, reason);
- logger.debug("Dispatching a WhiteboardParticipantChangeEvent event to "
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching a WhiteboardParticipantChangeEvent event to "
+ whiteboardParticipantListeners.size() + " listeners. event is: "
+ evt.toString());
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
index c666e9c..5a3f874 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/WhiteboardSessionJabberImpl.java
@@ -475,7 +475,8 @@ public class WhiteboardSessionJabberImpl
public WhiteboardObject createWhiteboardObject(String name)
{
WhiteboardObjectJabberImpl wbObj = null;
- logger.debug("[log] WhiteboardObjectXXX.NAME: " + name);
+ if (logger.isDebugEnabled())
+ logger.debug("[log] WhiteboardObjectXXX.NAME: " + name);
if (name.equals(WhiteboardObjectPath.NAME))
{
wbObj = new WhiteboardObjectPathJabberImpl();
@@ -792,7 +793,8 @@ public class WhiteboardSessionJabberImpl
new WhiteboardParticipantEvent(this, sourceWhiteboardParticipant,
eventID);
- logger.debug("Dispatching a WhiteboardParticipant event to "
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching a WhiteboardParticipant event to "
+ whiteboardListeners.size() + " listeners. event is: "
+ cpEvent.toString());
@@ -838,7 +840,8 @@ public class WhiteboardSessionJabberImpl
WhiteboardChangeEvent ccEvent =
new WhiteboardChangeEvent(this, type, oldValue, newValue);
- logger.debug("Dispatching a WhiteboardChange event to "
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching a WhiteboardChange event to "
+ whiteboardListeners.size() + " listeners. event is: "
+ ccEvent.toString());
@@ -895,7 +898,8 @@ public class WhiteboardSessionJabberImpl
*/
public void fireMessageEvent(EventObject evt)
{
- logger.debug("Dispatching a WhiteboardMessageEvent event to "
+ if (logger.isDebugEnabled())
+ logger.debug("Dispatching a WhiteboardMessageEvent event to "
+ messageListeners.size() + " listeners. event is: "
+ evt.toString());
@@ -1167,7 +1171,8 @@ public class WhiteboardSessionJabberImpl
if (msg.getType()
== org.jivesoftware.smack.packet.Message.Type.error)
{
- logger.info("WBObject error received from " + fromUserID);
+ if (logger.isInfoEnabled())
+ logger.info("WBObject error received from " + fromUserID);
int errorCode = packet.getError().getCode();
int errorResultCode =