aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/sip/communicator/impl/osdependent/OsDependentActivator.java12
-rw-r--r--src/net/java/sip/communicator/impl/osdependent/jdic/StatusSelector.java3
-rw-r--r--src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationPacketExtensionProvider.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQ.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQProvider.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationProvider.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/thumbnail/ThumbnailElement.java18
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectCircleJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectLineJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPacketExtension.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPathJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolyLineJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolygonJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectRectJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectTextJabberImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardSessionPacketExtension.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/MediaUtils.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/mock/MockCall.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/AdHocChatRoomMsnImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/EventManager.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/IncomingFileTransferRequestMsnImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetFileTransferMsnImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetPersistentPresenceMsnImpl.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetTypingNotificationsMsnImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java123
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/ImageRetriever.java24
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/OperationSetBasicInstantMessagingRssImpl.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java12
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderServiceRssImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/RssTimerRefreshFeed.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/UriHandlerRssImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/EventPackageSupport.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/dtmf/DTMFInfo.java27
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/sdp/SdpUtils.java42
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/security/MessageDigestAlgorithm.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ContactTimerSSHImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java18
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/SSHFileTransferDaemon.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/ContactYahooImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java39
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetFileTransferYahooImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetTypingNotificationsYahooImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java93
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/BonjourService.java57
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ClientThread.java21
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java9
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/DNSCache.java18
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/JmDNS.java111
69 files changed, 674 insertions, 340 deletions
diff --git a/src/net/java/sip/communicator/impl/osdependent/OsDependentActivator.java b/src/net/java/sip/communicator/impl/osdependent/OsDependentActivator.java
index 0fae343..668d6d8 100644
--- a/src/net/java/sip/communicator/impl/osdependent/OsDependentActivator.java
+++ b/src/net/java/sip/communicator/impl/osdependent/OsDependentActivator.java
@@ -55,26 +55,30 @@ public class OsDependentActivator
// Create the notification service implementation
SystrayService systrayService = new SystrayServiceJdicImpl();
- logger.info("Systray Service...[ STARTED ]");
+ if (logger.isInfoEnabled())
+ logger.info("Systray Service...[ STARTED ]");
bundleContext.registerService(
SystrayService.class.getName(),
systrayService,
null);
- logger.info("Systray Service ...[REGISTERED]");
+ if (logger.isInfoEnabled())
+ logger.info("Systray Service ...[REGISTERED]");
// Create the desktop service implementation
DesktopService desktopService = new DesktopServiceImpl();
- logger.info("Desktop Service...[ STARTED ]");
+ if (logger.isInfoEnabled())
+ logger.info("Desktop Service...[ STARTED ]");
bundleContext.registerService(
DesktopService.class.getName(),
desktopService,
null);
- logger.info("Desktop Service ...[REGISTERED]");
+ if (logger.isInfoEnabled())
+ logger.info("Desktop Service ...[REGISTERED]");
logger.logEntry();
}
diff --git a/src/net/java/sip/communicator/impl/osdependent/jdic/StatusSelector.java b/src/net/java/sip/communicator/impl/osdependent/jdic/StatusSelector.java
index 309de4d..0f29a18 100644
--- a/src/net/java/sip/communicator/impl/osdependent/jdic/StatusSelector.java
+++ b/src/net/java/sip/communicator/impl/osdependent/jdic/StatusSelector.java
@@ -184,7 +184,8 @@ public class StatusSelector
public void updateStatus(PresenceStatus presenceStatus)
{
- logger.trace("Systray update status for provider: "
+ if (logger.isTraceEnabled())
+ logger.trace("Systray update status for provider: "
+ provider.getAccountID().getAccountAddress()
+ ". The new status will be: " + presenceStatus.getStatusName());
diff --git a/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java b/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java
index 7bef757..1859035 100644
--- a/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java
+++ b/src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java
@@ -314,7 +314,8 @@ public class SystrayServiceJdicImpl
if (!popupHandlerSet.containsKey(handlerName))
{
popupHandlerSet.put(handlerName, handler);
- logger.info("added the following popup handler : " +
+ if (logger.isInfoEnabled())
+ logger.info("added the following popup handler : " +
handler);
if (configuredHandler != null &&
configuredHandler.equals(handler.getClass().getName()))
@@ -573,7 +574,8 @@ public class SystrayServiceJdicImpl
{
newHandler.addPopupMessageListener(popupMessageListener);
}
- logger.info(
+ if (logger.isInfoEnabled())
+ logger.info(
"setting the following popup handler as active : " + newHandler);
activePopupHandler = newHandler;
@@ -658,7 +660,8 @@ public class SystrayServiceJdicImpl
if (!popupHandlerSet.containsKey(
handler.getClass().getName()))
{
- logger.info(
+ if (logger.isInfoEnabled())
+ logger.info(
"adding the following popup handler : " + handler);
popupHandlerSet.put(
handler.getClass().getName(), handler);
@@ -686,7 +689,8 @@ public class SystrayServiceJdicImpl
}
} else if (serviceEvent.getType() == ServiceEvent.UNREGISTERING)
{
- logger.info(
+ if (logger.isInfoEnabled())
+ logger.info(
"removing the following popup handler : " + handler);
popupHandlerSet.remove(handler.getClass().getName());
if (activePopupHandler == handler)
@@ -702,7 +706,8 @@ public class SystrayServiceJdicImpl
}
} catch (IllegalStateException e)
{
- logger.debug(e);
+ if (logger.isDebugEnabled())
+ logger.debug(e);
}
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationPacketExtensionProvider.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationPacketExtensionProvider.java
index ef97713..d2cdda5 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationPacketExtensionProvider.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationPacketExtensionProvider.java
@@ -58,7 +58,8 @@ public class GeolocationPacketExtensionProvider
GeolocationPacketExtension result = new GeolocationPacketExtension();
- logger.trace("Trying to map XML Geolocation Extension");
+ if (logger.isTraceEnabled())
+ logger.trace("Trying to map XML Geolocation Extension");
boolean done = false;
while (!done)
@@ -162,7 +163,8 @@ public class GeolocationPacketExtensionProvider
GeolocationPacketExtensionProvider.ELEMENT_NAME))
{
done = true;
- logger.trace("Parsing finish");
+ if (logger.isTraceEnabled())
+ logger.trace("Parsing finish");
}
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQ.java
index 48b48d8..575fd35 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQ.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQ.java
@@ -173,7 +173,8 @@ public class MailboxIQ extends IQ
@Override
public String getChildElementXML()
{
- logger.debug("Mailbox.getChildElementXML usage");
+ if (logger.isDebugEnabled())
+ logger.debug("Mailbox.getChildElementXML usage");
String totalString = totalEstimate ? " total-estimate='1' " : "";
return "<mailbox result-time='" + resultTime + "' total-matched='"
+ totalMatched + "'" + totalString + "/>";
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQProvider.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQProvider.java
index 527f4b2..4429d4d 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQProvider.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxIQProvider.java
@@ -82,7 +82,8 @@ public class MailboxIQProvider
if(logger.isTraceEnabled())
{
logger.trace("xml parser returned eventType=" + eventType);
- logger.trace("parser="+parser.getText());
+ if (logger.isTraceEnabled())
+ logger.trace("parser="+parser.getText());
}
}
eventType = parser.next();
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java
index 7d33a8f..4b6a153 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/MailboxQueryIQ.java
@@ -49,7 +49,8 @@ public class MailboxQueryIQ extends IQ
@Override
public String getChildElementXML()
{
- logger.debug("QueryNotify.getChildElementXML usage");
+ if (logger.isDebugEnabled())
+ logger.debug("QueryNotify.getChildElementXML usage");
StringBuffer xml = new StringBuffer(
"<query xmlns='google:mail:notify'");
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java
index 0e9ea65..cbbd10a 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java
@@ -46,7 +46,8 @@ public class NewMailNotificationIQ extends IQ
@Override
public String getChildElementXML()
{
- logger.trace("NewMailNotification.getChildElementXML usage");
+ if (logger.isTraceEnabled())
+ logger.trace("NewMailNotification.getChildElementXML usage");
return "<iq type='"+"result"+"' "+
"from='"+getFrom()+"' "+
"to='"+getTo()+"' "+
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationProvider.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationProvider.java
index 4bc579b..e7dc9f4 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationProvider.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationProvider.java
@@ -42,7 +42,8 @@ public class NewMailNotificationProvider
*/
public IQ parseIQ(final XmlPullParser parser) throws Exception
{
- logger.debug("NewMailNotificationProvider.getChildElementXML usage");
+ if (logger.isDebugEnabled())
+ logger.debug("NewMailNotificationProvider.getChildElementXML usage");
NewMailNotificationIQ iq = new NewMailNotificationIQ();
return iq;
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/thumbnail/ThumbnailElement.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/thumbnail/ThumbnailElement.java
index e826a55..95327c9 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/thumbnail/ThumbnailElement.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/thumbnail/ThumbnailElement.java
@@ -116,19 +116,23 @@ public class ThumbnailElement
this.setHeight(Integer.parseInt(e.getAttribute(WIDTH)));
}
else
- logger.debug ("Element name unknown!");
+ if (logger.isDebugEnabled())
+ logger.debug ("Element name unknown!");
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
}
catch (IOException ex)
{
- logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
}
catch (Exception ex)
{
- logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem parsing Thumbnail Element : " + xml, ex);
}
}
@@ -286,11 +290,13 @@ public class ThumbnailElement
}
catch (NoSuchAlgorithmException e)
{
- logger.debug("Failed to encode the thumbnail in SHA-1.", e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to encode the thumbnail in SHA-1.", e);
}
catch (UnsupportedEncodingException e)
{
- logger.debug("Failed to encode the thumbnail in SHA-1.", e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to encode the thumbnail in SHA-1.", e);
}
return null;
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectCircleJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectCircleJabberImpl.java
index 34e35a2..d8d1a76 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectCircleJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectCircleJabberImpl.java
@@ -96,15 +96,18 @@ public class WhiteboardObjectCircleJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
index 8d7cad6..aaa5238 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectImageJabberImpl.java
@@ -96,15 +96,18 @@ public class WhiteboardObjectImageJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectLineJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectLineJabberImpl.java
index 8b21746..c6f178c 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectLineJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectLineJabberImpl.java
@@ -87,15 +87,18 @@ public class WhiteboardObjectLineJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPacketExtension.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPacketExtension.java
index f5ed288..ccf8f1a 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPacketExtension.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPacketExtension.java
@@ -168,19 +168,23 @@ public class WhiteboardObjectPacketExtension implements PacketExtension
this.action = WhiteboardObjectPacketExtension.ACTION_DELETE;
}
else //we have a problem :p
- logger.debug ("elementName unknow\n");
+ if (logger.isDebugEnabled())
+ logger.debug ("elementName unknow\n");
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : " + xml, ex);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPathJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPathJabberImpl.java
index f715378..7c818b4 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPathJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPathJabberImpl.java
@@ -84,15 +84,18 @@ public class WhiteboardObjectPathJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolyLineJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolyLineJabberImpl.java
index cba8dae..6dd259d 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolyLineJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolyLineJabberImpl.java
@@ -84,15 +84,18 @@ public class WhiteboardObjectPolyLineJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolygonJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolygonJabberImpl.java
index 7ea722d..02903e5 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolygonJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectPolygonJabberImpl.java
@@ -95,15 +95,18 @@ public class WhiteboardObjectPolygonJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectRectJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectRectJabberImpl.java
index 178795b..087a7be 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectRectJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectRectJabberImpl.java
@@ -132,15 +132,18 @@ public class WhiteboardObjectRectJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectTextJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectTextJabberImpl.java
index e3bfb8a..f9e9974 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectTextJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardObjectTextJabberImpl.java
@@ -102,15 +102,18 @@ public class WhiteboardObjectTextJabberImpl
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardObject : "+xml);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardObject : "+xml);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardSessionPacketExtension.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardSessionPacketExtension.java
index 258e36f..c574434 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardSessionPacketExtension.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/whiteboard/WhiteboardSessionPacketExtension.java
@@ -101,19 +101,23 @@ public class WhiteboardSessionPacketExtension
this.action = WhiteboardSessionPacketExtension.ACTION_LEAVE;
}
else
- logger.debug ("Element name unknown!");
+ if (logger.isDebugEnabled())
+ logger.debug ("Element name unknown!");
}
catch (ParserConfigurationException ex)
{
- logger.debug ("Problem WhiteboardSession : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardSession : " + xml, ex);
}
catch (IOException ex)
{
- logger.debug ("Problem WhiteboardSession : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardSession : " + xml, ex);
}
catch (Exception ex)
{
- logger.debug ("Problem WhiteboardSession : " + xml, ex);
+ if (logger.isDebugEnabled())
+ logger.debug ("Problem WhiteboardSession : " + xml, ex);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java
index 6e42309..d7eb3ed 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/AudioMediaSession.java
@@ -105,7 +105,8 @@ public class AudioMediaSession
localIp = getLocal().getLocalIp();
localPort = getLocal().getPort();
remotePort = getRemote().getPort();
- logger.info("AudioMediaSession : " + localIp + ":" + localPort +
+ if (logger.isInfoEnabled())
+ logger.info("AudioMediaSession : " + localIp + ":" + localPort +
" <-> " + remoteIp + ":" + remotePort);
// }
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/MediaUtils.java b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/MediaUtils.java
index e97c854..c1de4d9 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/MediaUtils.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/mediamgr/MediaUtils.java
@@ -158,7 +158,8 @@ public abstract class MediaUtils
return "G729";
default:
//throw new IllegalStateException("Unknown payload type");
- logger.debug("unknown payload type : " + payloadType);
+ if (logger.isDebugEnabled())
+ logger.debug("unknown payload type : " + payloadType);
return null;
}
}
@@ -209,7 +210,8 @@ public abstract class MediaUtils
return 18;
default:
//throw new IllegalStateException("Unknown sdp constant");
- logger.debug("unknown sdp constant : " + sdpConstant);
+ if (logger.isDebugEnabled())
+ logger.debug("unknown sdp constant : " + sdpConstant);
return -1;
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java b/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java
index 60c4567..9d5566d 100644
--- a/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java
+++ b/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java
@@ -70,7 +70,8 @@ public class MockCall
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/mock/MockOperationSetBasicTelephony.java b/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java
index 1079aea..7ed0e29 100644
--- a/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java
+++ b/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java
@@ -56,7 +56,8 @@ public class MockOperationSetBasicTelephony
= (MockCallPeer)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;
}
@@ -139,7 +140,8 @@ public class MockOperationSetBasicTelephony
//do nothing if the call is already ended
if (peer.getState().equals(CallPeerState.DISCONNECTED))
{
- logger.debug("Ignoring a request to hangup a call peer "
+ if (logger.isDebugEnabled())
+ logger.debug("Ignoring a request to hangup a call peer "
+"that is already DISCONNECTED");
return;
}
@@ -147,7 +149,8 @@ public class MockOperationSetBasicTelephony
MockCallPeer callPeer
= (MockCallPeer)peer;
- logger.info("hangupCallPeer");
+ if (logger.isInfoEnabled())
+ logger.info("hangupCallPeer");
callPeer.setState(CallPeerState.DISCONNECTED, null);
}
@@ -230,7 +233,8 @@ public class MockOperationSetBasicTelephony
MockCall sourceCall = (MockCall)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");
fireCallEvent(CallEvent.CALL_ENDED, sourceCall);
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/AdHocChatRoomMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/AdHocChatRoomMsnImpl.java
index 93994b7..2ba47bc 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/AdHocChatRoomMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/AdHocChatRoomMsnImpl.java
@@ -393,7 +393,8 @@ public class AdHocChatRoomMsnImpl
*/
public void sendMessage(Message message) throws OperationFailedException
{
- logger.info("switchboard="+this.switchboard);
+ if (logger.isInfoEnabled())
+ logger.info("switchboard="+this.switchboard);
this.switchboard.sendText(message.getContent());
AdHocChatRoomMessageDeliveredEvent msgDeliveredEvt
@@ -433,7 +434,8 @@ public class AdHocChatRoomMsnImpl
new AdHocChatRoomParticipantPresenceChangeEvent(
this, participant, eventID, eventReason);
- logger.trace("Will dispatch the following AdHocChatRoom event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following AdHocChatRoom event: " + evt);
Iterator<AdHocChatRoomParticipantPresenceListener> listeners = null;
synchronized (this.participantsPresenceListeners)
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java b/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java
index ad1f02d..93edd1b 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java
@@ -109,7 +109,8 @@ public class EventManager
*/
public void messageSent(Session session, Message message) throws Exception
{
- logger.trace(msnMessenger.getOwner().getEmail().getEmailAddress() +
+ if (logger.isTraceEnabled())
+ logger.trace(msnMessenger.getOwner().getEmail().getEmailAddress() +
" outgoing " + message);
}
@@ -125,7 +126,8 @@ public class EventManager
MsnIncomingMessage incoming = (MsnIncomingMessage)((WrapperMessage)message)
.getMessage();
- logger.trace(msnMessenger.getOwner().getEmail().getEmailAddress() +
+ if (logger.isTraceEnabled())
+ logger.trace(msnMessenger.getOwner().getEmail().getEmailAddress() +
" incoming : " + incoming);
if(incoming instanceof IncomingACK)
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/IncomingFileTransferRequestMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/IncomingFileTransferRequestMsnImpl.java
index b57efc8..161ee77 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/IncomingFileTransferRequestMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/IncomingFileTransferRequestMsnImpl.java
@@ -166,7 +166,8 @@ public class IncomingFileTransferRequestMsnImpl
}
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/msn/OperationSetAdHocMultiUserChatMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
index 2755846..1f73b0e 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
@@ -459,7 +459,8 @@ implements OperationSetAdHocMultiUserChat
Message newMessage = createMessage(message.getContent());
- logger.debug("Group chat message received.");
+ if (logger.isDebugEnabled())
+ logger.debug("Group chat message received.");
AdHocChatRoomMsnImpl chatRoom
= getLocalAdHocChatRoomInstance(switchboard);
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
index 2c6466a..225c8a6 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
@@ -172,7 +172,8 @@ public class OperationSetBasicInstantMessagingMsnImpl
*/
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());
@@ -212,7 +213,8 @@ public class OperationSetBasicInstantMessagingMsnImpl
if(sourceContact == null)
{
- logger.debug("received a message from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a message from an unknown contact: "
+ contact);
//create the volatile contact
sourceContact = opSetPersPresence.
@@ -250,7 +252,8 @@ public class OperationSetBasicInstantMessagingMsnImpl
if(sourceContact == null)
{
- logger.debug("received a message from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a message from an unknown contact: "
+ contact);
//create the volatile contact
sourceContact = opSetPersPresence.
@@ -319,7 +322,8 @@ public class OperationSetBasicInstantMessagingMsnImpl
if (sourceContact == null)
{
- logger.debug("received a new mail from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a new mail from an unknown contact: "
+ messageFrom
+ " &lt;" + messageFromAddr + "&gt;");
//create the volatile contact
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetFileTransferMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetFileTransferMsnImpl.java
index d19bc32..e954066 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetFileTransferMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetFileTransferMsnImpl.java
@@ -313,7 +313,8 @@ public class OperationSetFileTransferMsnImpl
*/
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/msn/OperationSetPersistentPresenceMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetPersistentPresenceMsnImpl.java
index dc10182..4a03403 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetPersistentPresenceMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetPersistentPresenceMsnImpl.java
@@ -416,7 +416,8 @@ public class OperationSetPersistentPresenceMsnImpl
ContactMsnImpl contact = ssContactList.findContactById(contactIdentifier);
if(contact == null)
{
- logger.info("Contact not found id :" + contactIdentifier);
+ if (logger.isInfoEnabled())
+ logger.info("Contact not found id :" + contactIdentifier);
return null;
}
else
@@ -653,7 +654,8 @@ public class OperationSetPersistentPresenceMsnImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The msn provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The msn provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -775,7 +777,8 @@ public class OperationSetPersistentPresenceMsnImpl
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);
}
@@ -804,7 +807,8 @@ public class OperationSetPersistentPresenceMsnImpl
*/
public void ownerStatusChanged(MsnMessenger messenger)
{
- logger.trace("Own status changed to " + messenger.getOwner().getStatus());
+ if (logger.isTraceEnabled())
+ logger.trace("Own status changed to " + messenger.getOwner().getStatus());
PresenceStatus oldStatus = currentStatus;
currentStatus =
msnStatusToPresenceStatus(messenger.getOwner().getStatus());
@@ -819,7 +823,8 @@ public class OperationSetPersistentPresenceMsnImpl
public void contactStatusChanged( MsnMessenger messenger,
MsnContact contact)
{
- logger.debug("Received a status update for contact=" + contact);
+ if (logger.isDebugEnabled())
+ logger.debug("Received a status update for contact=" + contact);
ContactMsnImpl sourceContact
= ssContactList
@@ -827,7 +832,8 @@ public class OperationSetPersistentPresenceMsnImpl
if (sourceContact == null)
{
- logger.debug("No source contact found for msncontact=" + contact);
+ if (logger.isDebugEnabled())
+ logger.debug("No source contact found for msncontact=" + contact);
// maybe list is not inited yet will store till init
earlyStatusChange.put(contact.getEmail().getEmailAddress(),
@@ -852,7 +858,8 @@ public class OperationSetPersistentPresenceMsnImpl
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);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetTypingNotificationsMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetTypingNotificationsMsnImpl.java
index 2a5c912..2de8c50 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetTypingNotificationsMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetTypingNotificationsMsnImpl.java
@@ -156,7 +156,8 @@ public class OperationSetTypingNotificationsMsnImpl
*/
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)
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java
index 589484f..c46861a 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java
@@ -400,7 +400,8 @@ public class ProtocolProviderServiceMsnImpl
*/
public void loginCompleted(MsnMessenger msnMessenger)
{
- logger.trace("loginCompleted " + msnMessenger.getActualMsnProtocol());
+ if (logger.isTraceEnabled())
+ logger.trace("loginCompleted " + msnMessenger.getActualMsnProtocol());
fireRegistrationStateChanged(
getRegistrationState(),
RegistrationState.REGISTERED,
@@ -414,7 +415,8 @@ public class ProtocolProviderServiceMsnImpl
*/
public void logout(MsnMessenger msnMessenger)
{
- logger.trace("logout");
+ if (logger.isTraceEnabled())
+ logger.trace("logout");
// The synchronization is for logoutReceived at least.
synchronized (initializationLock)
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java
index e2d1a19..e1544d3 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/ServerStoredContactListMsnImpl.java
@@ -163,7 +163,8 @@ public class ServerStoredContactListMsnImpl
{
//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;
}
@@ -174,7 +175,8 @@ public class ServerStoredContactListMsnImpl
, msnProvider
, parentOperationSet);
- logger.trace("Will dispatch the following grp event: " + evt);
+ if (logger.isTraceEnabled())
+ logger.trace("Will dispatch the following grp event: " + evt);
Iterator<ServerStoredGroupListener> listeners = null;
synchronized (serverStoredGroupListeners)
@@ -209,7 +211,8 @@ public class ServerStoredContactListMsnImpl
{
//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;
}
@@ -232,7 +235,8 @@ public class ServerStoredContactListMsnImpl
{
//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;
}
@@ -367,7 +371,8 @@ public class ServerStoredContactListMsnImpl
public void addContact(final ContactGroupMsnImpl parent, final 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
@@ -376,7 +381,8 @@ public class ServerStoredContactListMsnImpl
if( existingContact != null
&& existingContact.isPersistent() )
{
- logger.debug("Contact " + id + " already exists.");
+ if (logger.isDebugEnabled())
+ logger.debug("Contact " + id + " already exists.");
throw new OperationFailedException(
"Contact " + id + " already exists.",
OperationFailedException.SUBSCRIPTION_ALREADY_EXISTS);
@@ -534,13 +540,15 @@ public class ServerStoredContactListMsnImpl
public void createGroup(String groupName)
throws OperationFailedException
{
- logger.trace("Creating group: " + groupName);
+ if (logger.isTraceEnabled())
+ logger.trace("Creating group: " + groupName);
ContactGroupMsnImpl 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);
@@ -560,7 +568,8 @@ public class ServerStoredContactListMsnImpl
if(groupToRemove.getSourceGroup().getGroupId().equals("0"))
return;
- logger.trace("removing group " + groupToRemove);
+ if (logger.isTraceEnabled())
+ logger.trace("removing group " + groupToRemove);
MsnContact[] contacts = groupToRemove.getSourceGroup().getContacts();
ModListenerRemoveGroup removedContactsListener =
@@ -569,7 +578,8 @@ public class ServerStoredContactListMsnImpl
for (int i = 0; i < contacts.length; i++)
{
- logger.trace("removing contact from group " + contacts[i]);
+ if (logger.isTraceEnabled())
+ logger.trace("removing contact from group " + contacts[i]);
msnProvider.getMessenger().removeFriend(contacts[i].getEmail(),
groupToRemove.getSourceGroup().getGroupId());
@@ -590,7 +600,8 @@ public class ServerStoredContactListMsnImpl
*/
void removeContact(ContactMsnImpl contactToRemove)
{
- logger.trace("Removing msn contact "
+ if (logger.isTraceEnabled())
+ logger.trace("Removing msn contact "
+ contactToRemove.getSourceContact());
Email contactsEmail = contactToRemove.getSourceContact().getEmail();
@@ -634,7 +645,8 @@ public class ServerStoredContactListMsnImpl
if(oldParent instanceof RootContactGroupMsnImpl)
{
- logger.trace("Will Move from root " + contact);
+ if (logger.isTraceEnabled())
+ logger.trace("Will Move from root " + contact);
msnProvider.getMessenger().
copyFriend(
contact.getSourceContact().getEmail(),
@@ -675,7 +687,8 @@ public class ServerStoredContactListMsnImpl
}
else
{
- logger.trace("Will Move from "
+ if (logger.isTraceEnabled())
+ logger.trace("Will Move from "
+ contact.getParentContactGroup()
+ " to : " + newParent + " - contact: " + contact);
// contactListModListenerImpl.waitForMove(contact.getAddress());
@@ -740,7 +753,8 @@ public class ServerStoredContactListMsnImpl
{
//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;
}
@@ -789,7 +803,8 @@ public class ServerStoredContactListMsnImpl
{
//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;
}
@@ -835,7 +850,8 @@ public class ServerStoredContactListMsnImpl
public void contactListInitCompleted(MsnMessenger messenger)
{
- logger.trace("contactListInitCompleted");
+ if (logger.isTraceEnabled())
+ logger.trace("contactListInitCompleted");
isInitialized = true;
if(logger.isDebugEnabled())
@@ -937,7 +953,8 @@ public class ServerStoredContactListMsnImpl
public void contactAddedMe(MsnMessenger messenger,
MsnContactPending[] pendingContacts)
{
- logger.trace("Contact add us ");
+ if (logger.isTraceEnabled())
+ logger.trace("Contact add us ");
/**
* TODO this method introduced for msn15 currently used.
* the old one below no more used.
@@ -948,7 +965,8 @@ public class ServerStoredContactListMsnImpl
{
// try
// {
- logger.trace("Contact add us " + contact);
+ if (logger.isTraceEnabled())
+ logger.trace("Contact add us " + contact);
if(parentOperationSet.getAuthorizationHandler() == null)
return;
@@ -1034,7 +1052,8 @@ public class ServerStoredContactListMsnImpl
if(contactToRemove == null)
{
- logger.trace("Contact not found!" + contact);
+ if (logger.isTraceEnabled())
+ logger.trace("Contact not found!" + contact);
return;
}
@@ -1055,7 +1074,8 @@ public class ServerStoredContactListMsnImpl
public void groupAddCompleted(MsnMessenger messenger, MsnGroup group)
{
- logger.trace("groupAdded " + group);
+ if (logger.isTraceEnabled())
+ logger.trace("groupAdded " + group);
ContactGroupMsnImpl newGroup =
new ContactGroupMsnImpl(group,
new MsnContact[]{},
@@ -1071,7 +1091,8 @@ public class ServerStoredContactListMsnImpl
if(group == null)
{
- logger.trace("Group not found!" + g);
+ if (logger.isTraceEnabled())
+ logger.trace("Group not found!" + g);
return;
}
@@ -1155,7 +1176,8 @@ public class ServerStoredContactListMsnImpl
if(g == null)
{
- logger.trace("Group is null! ");
+ if (logger.isTraceEnabled())
+ logger.trace("Group is null! ");
return;
}
@@ -1164,13 +1186,15 @@ public class ServerStoredContactListMsnImpl
if(contactToRemove == null)
{
- logger.trace("Contact not found " + c);
+ if (logger.isTraceEnabled())
+ logger.trace("Contact not found " + c);
return;
}
if(dstGroup == null)
{
- logger.trace("Group not found " + g);
+ if (logger.isTraceEnabled())
+ logger.trace("Group not found " + g);
return;
}
@@ -1225,7 +1249,8 @@ public class ServerStoredContactListMsnImpl
}
catch (InterruptedException ex)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"Interrupted while waiting for a subscription evt", ex);
}
}
@@ -1246,7 +1271,8 @@ public class ServerStoredContactListMsnImpl
findContactGroupByMsnId(group.getGroupId());
if(groupToRename == null){
- logger.trace("Group not found!" + group);
+ if (logger.isTraceEnabled())
+ logger.trace("Group not found!" + group);
return;
}
@@ -1323,59 +1349,74 @@ public class ServerStoredContactListMsnImpl
{
MsnMessenger messenger = msnProvider.getMessenger();
- logger.info("---=Start Printing contact list=---");
+ if (logger.isInfoEnabled())
+ logger.info("---=Start Printing contact list=---");
MsnContactList list = messenger.getContactList();
- logger.info("Forward list");
+ if (logger.isInfoEnabled())
+ logger.info("Forward list");
MsnContact[] c = list.getContactsInList(MsnList.FL);
for(int i = 0; i < c.length; i++)
{
- logger.info("c : " + c[i]);
+ if (logger.isInfoEnabled())
+ logger.info("c : " + c[i]);
MsnGroup[] groups = c[i].getBelongGroups();
for(int j = 0; j < groups.length; j++)
{
- logger.info("in group " + groups[j]);
+ if (logger.isInfoEnabled())
+ logger.info("in group " + groups[j]);
}
}
- logger.info("Allow list");
+ if (logger.isInfoEnabled())
+ logger.info("Allow list");
c = list.getContactsInList(MsnList.AL);
for(int i = 0; i < c.length; i++)
{
- logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
+ if (logger.isInfoEnabled())
+ logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
}
- logger.info("Block list");
+ if (logger.isInfoEnabled())
+ logger.info("Block list");
c = list.getContactsInList(MsnList.BL);
for(int i = 0; i < c.length; i++)
{
- logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
+ if (logger.isInfoEnabled())
+ logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
}
- logger.info("pending list");
+ if (logger.isInfoEnabled())
+ logger.info("pending list");
c = list.getContactsInList(MsnList.PL);
for(int i = 0; i < c.length; i++)
{
- logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
+ if (logger.isInfoEnabled())
+ logger.info("c : " + c[i] + " g:" + c[i].getBelongGroups().length);
}
- logger.info("Reverse list");
+ if (logger.isInfoEnabled())
+ logger.info("Reverse list");
c = list.getContactsInList(MsnList.RL);
for(int i = 0; i < c.length; i++)
{
- logger.info("c : " + c[i] + " g:" +
+ if (logger.isInfoEnabled())
+ logger.info("c : " + c[i] + " g:" +
c[i].getBelongGroups().length);
}
- logger.info("Number of groups : "
+ if (logger.isInfoEnabled())
+ logger.info("Number of groups : "
+ messenger.getContactList().getGroups().length);
MsnGroup[] groups = messenger.getContactList().getGroups();
for(int j = 0; j < groups.length; j++)
{
- logger.info("group " + groups[j]);
+ if (logger.isInfoEnabled())
+ logger.info("group " + groups[j]);
}
- logger.info("---=End Printing contact list=---");
+ if (logger.isInfoEnabled())
+ logger.info("---=End Printing contact list=---");
}
private class ImageUpdater
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/ImageRetriever.java b/src/net/java/sip/communicator/impl/protocol/rss/ImageRetriever.java
index 0139d42..e0481a6 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/ImageRetriever.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/ImageRetriever.java
@@ -151,7 +151,8 @@ public class ImageRetriever extends Thread
}
catch (Exception exc)
{
- logger.trace("Cannot load image for contact " + this + " : "
+ if (logger.isTraceEnabled())
+ logger.trace("Cannot load image for contact " + this + " : "
+ exc.getMessage(), exc);
return null;
@@ -234,7 +235,8 @@ public class ImageRetriever extends Thread
}
catch (Exception exc)
{
- logger.trace("Failed to retrieve link image.", exc);
+ if (logger.isTraceEnabled())
+ logger.trace("Failed to retrieve link image.", exc);
}
return null;
@@ -271,7 +273,8 @@ public class ImageRetriever extends Thread
ICOFile favicon = new ICOFile(location);
- logger.trace("Icon has " + favicon.getImageCount() + " pages");
+ if (logger.isTraceEnabled())
+ logger.trace("Icon has " + favicon.getImageCount() + " pages");
for (int i = 0; i < favicon.getDescriptors().size(); i++)
{
@@ -305,8 +308,10 @@ public class ImageRetriever extends Thread
ImageIO.write((BufferedImage) selectedIcon, "PNG", output);
result = output.toByteArray();
- logger.trace("Result has " + result.length + " bytes");
- logger.trace("Icon is " + maxWidth + " px X " + maxWidth + " px @ "
+ if (logger.isTraceEnabled())
+ logger.trace("Result has " + result.length + " bytes");
+ if (logger.isTraceEnabled())
+ logger.trace("Icon is " + maxWidth + " px X " + maxWidth + " px @ "
+ maxColors + " colors");
output.close();
@@ -320,13 +325,15 @@ public class ImageRetriever extends Thread
catch (IOException ioex)
{
logger.warn("I/O Error on favicon retrieval. " + ioex.getMessage());
- logger.debug("I/O Error on favicon retrieval. " + ioex, ioex);
+ if (logger.isDebugEnabled())
+ logger.debug("I/O Error on favicon retrieval. " + ioex, ioex);
}
catch (Exception ex)
{
logger.warn("Unknown error on favicon retrieval. " + ex +
". Error for location: " + location, ex);
- logger.debug("", ex);
+ if (logger.isDebugEnabled())
+ logger.debug("", ex);
}
return null;
@@ -341,7 +348,8 @@ public class ImageRetriever extends Thread
*/
private byte[] getDefaultRssIcon()
{
- logger.trace("Loading default icon at " + defaultIconId);
+ if (logger.isTraceEnabled())
+ logger.trace("Loading default icon at " + defaultIconId);
return ProtocolIconRssImpl.getImageInBytes(defaultIconId);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/OperationSetBasicInstantMessagingRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/OperationSetBasicInstantMessagingRssImpl.java
index 9b4bce5..8b9fc03 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/OperationSetBasicInstantMessagingRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/OperationSetBasicInstantMessagingRssImpl.java
@@ -151,7 +151,8 @@ public class OperationSetBasicInstantMessagingRssImpl
logger.warn("RSS flow no longer exists. Error was: "
+ ex.getMessage());
- logger.debug(ex);
+ if (logger.isDebugEnabled())
+ logger.debug(ex);
return;
}
catch (OperationFailedException ex)
@@ -237,14 +238,16 @@ public class OperationSetBasicInstantMessagingRssImpl
if (timer != null )
return;
- logger.trace("Creating rss timer and task.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating rss timer and task.");
RssTimerRefreshFeed refresh = new RssTimerRefreshFeed(this);
this.timer = new Timer();
this.timer.scheduleAtFixedRate(refresh,
INITIAL_RSS_LOAD_DELAY,
PERIOD_REFRESH_RSS);
- logger.trace("Done.");
+ if (logger.isTraceEnabled())
+ logger.trace("Done.");
}
/**
@@ -466,7 +469,8 @@ public class OperationSetBasicInstantMessagingRssImpl
}
catch (OperationFailedException exc)
{
- logger.info("We could not remove a dead contact", exc);
+ if (logger.isInfoEnabled())
+ logger.info("We could not remove a dead contact", exc);
}
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java
index 16d1795..5656578 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/OperationSetPersistentPresenceRssImpl.java
@@ -519,7 +519,8 @@ public class OperationSetPersistentPresenceRssImpl
if(findContactByID(contactIdentifier) != null)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"contact with same id already exists - " + contactIdentifier);
return;
}
@@ -572,7 +573,8 @@ public class OperationSetPersistentPresenceRssImpl
//ignore and subscribe the contact so that the exception would
//occur while we try to refresh it. This way we would ask the
//user whether they want it removed.
- logger.debug("failed to create a URL for address "
+ if (logger.isDebugEnabled())
+ logger.debug("failed to create a URL for address "
+ contactIdentifier
+ ". Error was: "
+ ex.getMessage()
@@ -749,7 +751,8 @@ public class OperationSetPersistentPresenceRssImpl
//ignore and subscribe the contact so that the exception would
//occur while we try to refresh it. This way we would ask the
//user whether they want it removed.
- logger.debug("failed to create a URL for address "
+ if (logger.isDebugEnabled())
+ logger.debug("failed to create a URL for address "
+ rssURL
+ ". Error was: "
+ ex.getMessage()
@@ -757,7 +760,8 @@ public class OperationSetPersistentPresenceRssImpl
}
catch(OperationFailedException ex)
{
- logger.debug("failed to create a URL for address "
+ if (logger.isDebugEnabled())
+ logger.debug("failed to create a URL for address "
+ rssURL
+ ". Error was: "
+ ex.getMessage()
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderServiceRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderServiceRssImpl.java
index 46ffb20..50e9cc3 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderServiceRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderServiceRssImpl.java
@@ -65,7 +65,8 @@ public class ProtocolProviderServiceRssImpl
*/
public ProtocolProviderServiceRssImpl()
{
- logger.trace("Creating a rss provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a rss provider.");
}
/**
@@ -186,7 +187,8 @@ public class ProtocolProviderServiceRssImpl
{
return;
}
- logger.trace("Killing the Rss Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Rss Protocol Provider.");
if(isRegistered())
{
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java b/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
index 04109a0..228aefc 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
@@ -88,7 +88,8 @@ public class RssActivator
rssProviderFactory,
hashtable);
- logger.info("RSS protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("RSS protocol implementation [STARTED].");
uriHandler = new UriHandlerRssImpl();
bundleContext.addServiceListener(uriHandler);
@@ -134,7 +135,8 @@ public class RssActivator
context.removeServiceListener(uriHandler);
- logger.info("RSS protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("RSS protocol implementation [STOPPED].");
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/RssTimerRefreshFeed.java b/src/net/java/sip/communicator/impl/protocol/rss/RssTimerRefreshFeed.java
index 0ad6253..9860b23 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/RssTimerRefreshFeed.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/RssTimerRefreshFeed.java
@@ -41,7 +41,8 @@ public class RssTimerRefreshFeed
*/
public void run()
{
- logger.trace("Starting a periodic rss check.");
+ if (logger.isTraceEnabled())
+ logger.trace("Starting a periodic rss check.");
this.opSet.refreshAllRssFeeds();
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/UriHandlerRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/UriHandlerRssImpl.java
index d85bfcf..83168dd 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/UriHandlerRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/UriHandlerRssImpl.java
@@ -135,7 +135,8 @@ public class UriHandlerRssImpl
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/sip/EventPackageSupport.java b/src/net/java/sip/communicator/impl/protocol/sip/EventPackageSupport.java
index 92a21b4..c945e3a 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/EventPackageSupport.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/EventPackageSupport.java
@@ -334,7 +334,8 @@ public class EventPackageSupport
{
try
{
- logger.debug("Authenticating a message request.");
+ if (logger.isDebugEnabled())
+ logger.debug("Authenticating a message request.");
ClientTransaction retryTran
= protocolProvider
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
index 1e1b5f2..d6d942e 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
@@ -679,7 +679,8 @@ public class ProtocolProviderServiceSipImpl
}
Request request = transaction.getRequest();
- logger.debug("Transaction terminated for req=\n" + request);
+ if (logger.isDebugEnabled())
+ logger.debug("Transaction terminated for req=\n" + request);
//find the object that is supposed to take care of responses with the
//corresponding method
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java b/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
index c905dd9..9511b3e 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
@@ -228,7 +228,8 @@ public class SipLogger
else
msgHeader = "JAIN-SIP received a message from=\"";
- logger.info( msgHeader + from + "\" to=\"" + to + "\" at=" + time
+ if (logger.isInfoEnabled())
+ logger.info( msgHeader + from + "\" to=\"" + to + "\" at=" + time
+ ":\n" + message);
}
@@ -255,7 +256,8 @@ public class SipLogger
else
msgHeader = "JAIN-SIP received a message from=\"";
- logger.info(msgHeader + from + "\" to=\"" + to + "\" at " + time
+ if (logger.isInfoEnabled())
+ logger.info(msgHeader + from + "\" to=\"" + to + "\" at " + time
+ " (status: " + status + "):\n" + message);
}
@@ -281,7 +283,8 @@ public class SipLogger
else
msgHeader = "JAIN-SIP received a message from=\"";
- logger.info(msgHeader + from + "\" to=\"" + to + "\" (status: "
+ if (logger.isInfoEnabled())
+ logger.info(msgHeader + from + "\" to=\"" + to + "\" (status: "
+ status + "):\n" + message);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/dtmf/DTMFInfo.java b/src/net/java/sip/communicator/impl/protocol/sip/dtmf/DTMFInfo.java
index 35be721..28cc6b2 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/dtmf/DTMFInfo.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/dtmf/DTMFInfo.java
@@ -170,7 +170,8 @@ public class DTMFInfo
}
callPeer.getDialog().sendRequest(clientTransaction);
- logger.debug("sent request:\n" + info);
+ if (logger.isDebugEnabled())
+ logger.debug("sent request:\n" + info);
}
catch (SipException ex)
{
@@ -193,7 +194,8 @@ public class DTMFInfo
{
if (requestEvent == null)
{
- logger.debug("requestEvent null");
+ if (logger.isDebugEnabled())
+ logger.debug("requestEvent null");
}
logger.error("We don't cope with requests" + requestEvent);
return false;
@@ -211,24 +213,28 @@ public class DTMFInfo
{
if (responseEvent == null)
{
- logger.debug("null responseEvent");
+ if (logger.isDebugEnabled())
+ logger.debug("null responseEvent");
return false;
}
Response response = responseEvent.getResponse();
if (response == null)
{
- logger.debug("null response");
+ if (logger.isDebugEnabled())
+ logger.debug("null response");
return false;
}
int code = response.getStatusCode();
- logger.debug("DTMF status code=" + code);
+ if (logger.isDebugEnabled())
+ logger.debug("DTMF status code=" + code);
if (code != 200)
{
logger.error("DTMF Send failed :" + code);
}
else
{
- logger.debug("DTMF succeeded");
+ if (logger.isDebugEnabled())
+ logger.debug("DTMF succeeded");
}
return true;
}
@@ -261,7 +267,8 @@ public class DTMFInfo
//we do nothing
if (exceptionEvent == null)
{
- logger.debug("ioexception null");
+ if (logger.isDebugEnabled())
+ logger.debug("ioexception null");
return false;
}
logger.error("ioexception :" + exceptionEvent);
@@ -280,7 +287,8 @@ public class DTMFInfo
TransactionTerminatedEvent transactionTerminatedEvent)
{
//we do nothing
- logger.info("Transaction Terminated :" + transactionTerminatedEvent);
+ if (logger.isInfoEnabled())
+ logger.info("Transaction Terminated :" + transactionTerminatedEvent);
return false;
}
@@ -296,7 +304,8 @@ public class DTMFInfo
DialogTerminatedEvent dialogTerminatedEvent)
{
//we do nothing
- logger.info("Dialog Terminated :" + dialogTerminatedEvent);
+ if (logger.isInfoEnabled())
+ logger.info("Dialog Terminated :" + dialogTerminatedEvent);
return false;
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/sdp/SdpUtils.java b/src/net/java/sip/communicator/impl/protocol/sip/sdp/SdpUtils.java
index 059df99..d5248e2 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/sdp/SdpUtils.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/sdp/SdpUtils.java
@@ -213,7 +213,8 @@ public class SdpUtils
catch (Exception e)
{
// can't happen, ignore
- logger.info("Something very odd just happened.", e);
+ if (logger.isInfoEnabled())
+ logger.info("Something very odd just happened.", e);
}
//now, RFC 3264 says all previous m= fields must be present and new ones
@@ -264,7 +265,8 @@ public class SdpUtils
{
// never thrown, unless completeMediaDescList is null and that
// can't be since we just created it.
- logger.info("A crazy thing just happened.", e);
+ if (logger.isInfoEnabled())
+ logger.info("A crazy thing just happened.", e);
}
return update;
@@ -344,7 +346,8 @@ public class SdpUtils
//this is never thrown by the implementation because it doesn't
//do lazy parsing ... and whose idea was it to have an exception
//here anyway ?!?
- logger.debug("A funny thing just happened ...", exc);
+ if (logger.isDebugEnabled())
+ logger.debug("A funny thing just happened ...", exc);
return mediaFmts;
}
@@ -359,7 +362,8 @@ public class SdpUtils
catch (NumberFormatException e)
{
//weird payload type. contact is sending rubbish. try to ignore
- logger.debug(ptStr + " is not a valid payload type", e);
+ if (logger.isDebugEnabled())
+ logger.debug(ptStr + " is not a valid payload type", e);
continue;
}
@@ -373,7 +377,8 @@ public class SdpUtils
catch (SdpException e)
{
//there was a problem parsing the rtpmap. try to ignore.
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
rtpmap + " does not seem like a valid rtpmap: attribute", e);
}
@@ -387,7 +392,8 @@ public class SdpUtils
catch (SdpException exc)
{
//there was a problem parsing the fmtp: try to ignore.
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
fmtp + " does not seem like a valid fmtp: attribute", exc);
}
@@ -400,7 +406,8 @@ public class SdpUtils
}
catch(SdpException exc)
{
- logger.debug("Problem parsing advanced attributes", exc);
+ if (logger.isDebugEnabled())
+ logger.debug("Problem parsing advanced attributes", exc);
}
MediaFormat mediaFormat = null;
@@ -413,7 +420,8 @@ public class SdpUtils
//this is never thrown by the implementation because it doesn't
//do lazy parsing ... and whose idea was it to have an exception
//here anyway ?!?
- logger.debug("A funny thing just happened ...", e);
+ if (logger.isDebugEnabled())
+ logger.debug("A funny thing just happened ...", e);
continue;
}
@@ -469,7 +477,8 @@ public class SdpUtils
//this is never thrown by the implementation because it doesn't
//do lazy parsing ... and whose idea was it to have an exception
//here anyway ?!?
- logger.debug("A funny thing just happened ...", e);
+ if (logger.isDebugEnabled())
+ logger.debug("A funny thing just happened ...", e);
continue;
}
@@ -657,7 +666,8 @@ public class SdpUtils
}
catch(NumberFormatException exc)
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
nChansStr + " is not a valid number of channels.",
exc);
}
@@ -744,7 +754,8 @@ public class SdpUtils
catch (SdpParseException e)
{
//can't happen. jain sip doesn't do lazy parsing
- logger.debug("The impossible has just occurred!", e);
+ if (logger.isDebugEnabled())
+ logger.debug("The impossible has just occurred!", e);
return null;
}
int idx = -1;
@@ -1178,7 +1189,8 @@ public class SdpUtils
catch (SdpParseException e)
{
//can't happen (checkout the jain-sdp code if you wish)
- logger.debug("The impossible has just occurred!", e);
+ if (logger.isDebugEnabled())
+ logger.debug("The impossible has just occurred!", e);
}
for (MediaDirection value : MediaDirection.values())
@@ -1206,7 +1218,8 @@ public class SdpUtils
if (sdpUriField == null)
{
- logger.trace("Call URI was null.");
+ if (logger.isTraceEnabled())
+ logger.trace("Call URI was null.");
return null;
}
@@ -1480,7 +1493,8 @@ public class SdpUtils
catch (SdpException exc)
{
// impossible to happen for reasons mentioned many times here :)
- logger.debug("Invalid media type in m= line: " + description, exc);
+ if (logger.isDebugEnabled())
+ logger.debug("Invalid media type in m= line: " + description, exc);
throw new IllegalArgumentException(
"Invalid media type in m= line: " + description, exc);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/security/MessageDigestAlgorithm.java b/src/net/java/sip/communicator/impl/protocol/sip/security/MessageDigestAlgorithm.java
index 6961adf..b65f397 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/security/MessageDigestAlgorithm.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/security/MessageDigestAlgorithm.java
@@ -58,7 +58,8 @@ public class MessageDigestAlgorithm
String entity_body,
String qop_value)
{
- logger.debug("trying to authenticate using : " + algorithm + ", "
+ if (logger.isDebugEnabled())
+ logger.debug("trying to authenticate using : " + algorithm + ", "
+ username_value + ", " + realm_value + ", " + (passwd != null
&& passwd.trim().length() > 0) + ", " + nonce_value + ", "
+ nc_value + ", " + cnonce_value + ", " + method + ", "
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java b/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java
index 8663d5b..ae8364d 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java
@@ -154,12 +154,14 @@ public class SipSecurityManager
{
//there's a stored password though so let's try it.
ccEntry = createCcEntryWithStoredPassword(storedPassword);
- logger.trace("seem to have a stored pass! Try with it.");
+ if (logger.isTraceEnabled())
+ logger.trace("seem to have a stored pass! Try with it.");
}
else
{
//obtain new credentials
- logger.trace("We don't seem to have a good pass! Get one.");
+ if (logger.isTraceEnabled())
+ logger.trace("We don't seem to have a good pass! Get one.");
ccEntry = createCcEntryWithNewCredentials(
realm, SecurityAuthority.AUTHENTICATION_REQUIRED);
@@ -198,7 +200,8 @@ public class SipSecurityManager
//we have a cache entry and it has not seen this transaction
//lets use it again.
//(this "else" is here for readability only)
- logger.trace( "We seem to have a pass in the cache. "
+ if (logger.isTraceEnabled())
+ logger.trace( "We seem to have a pass in the cache. "
+"Let's try with it.");
}
}
@@ -226,7 +229,8 @@ public class SipSecurityManager
ccEntry.pushBranchID(retryTran.getBranchId());
cachedCredentials.cacheEntry(realm, ccEntry);
- logger.debug("Created authorization header: " +
+ if (logger.isDebugEnabled())
+ logger.debug("Created authorization header: " +
authorization.toString());
// get the unique Call-ID
@@ -243,7 +247,8 @@ public class SipSecurityManager
reoriginatedRequest.addHeader(authorization);
}
- logger.debug("Returning authorization transaction.");
+ if (logger.isDebugEnabled())
+ logger.debug("Returning authorization transaction.");
return retryTran;
}
@@ -340,7 +345,8 @@ public class SipSecurityManager
cachedCredentials.cacheEntry(realmsIter.next(), ccEntry);
}
- logger.debug("Returning authorization transaction.");
+ if (logger.isDebugEnabled())
+ logger.debug("Returning authorization transaction.");
return retryTran;
}
@@ -618,7 +624,8 @@ public class SipSecurityManager
{
// we are using the host port and transport of an existing Via
// header so it would be quite weird to get this exception.
- logger.debug("failed to reset a Via header");
+ if (logger.isDebugEnabled())
+ logger.debug("failed to reset a Via header");
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
index b1c2109..c965ed0 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
@@ -353,7 +353,8 @@ public class ContactSSHImpl
int fifthCommaIndex = this.persistentData.indexOf(separator,
fourthCommaIndex +1);
- logger.debug("Commas: " + firstCommaIndex + " " + secondCommaIndex + " "
+ if (logger.isDebugEnabled())
+ logger.debug("Commas: " + firstCommaIndex + " " + secondCommaIndex + " "
+ thirdCommaIndex + " " +fourthCommaIndex + " "
+fifthCommaIndex);
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ContactTimerSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ContactTimerSSHImpl.java
index 236d10f..33c5c90 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ContactTimerSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ContactTimerSSHImpl.java
@@ -67,7 +67,8 @@ public class ContactTimerSSHImpl
persistentPresence.changeContactPresenceStatus(
sshContact, SSHStatusEnum.ONLINE);
- logger.debug("SSH Host " + sshContact
+ if (logger.isDebugEnabled())
+ logger.debug("SSH Host " + sshContact
.getSSHConfigurationForm().getHostName() + ": Online");
}
@@ -84,7 +85,8 @@ public class ContactTimerSSHImpl
persistentPresence.changeContactPresenceStatus(
sshContact, SSHStatusEnum.OFFLINE);
- logger.debug("SSH Host " + sshContact.getSSHConfigurationForm()
+ if (logger.isDebugEnabled())
+ logger.debug("SSH Host " + sshContact.getSSHConfigurationForm()
.getHostName() + ": Offline");
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
index 10b1354..eb90dc2 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
@@ -105,7 +105,8 @@ public class ProtocolProviderServiceSSHImpl
*/
public ProtocolProviderServiceSSHImpl()
{
- logger.trace("Creating a ssh provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a ssh provider.");
try
{
@@ -363,7 +364,8 @@ public class ProtocolProviderServiceSSHImpl
OperationFailedException,
InterruptedException
{
- logger.info("Creating a new SSH Session to "
+ if (logger.isInfoEnabled())
+ logger.info("Creating a new SSH Session to "
+ sshContact.getHostName());
// creating a new JSch Stack identifier for contact
@@ -414,7 +416,8 @@ public class ProtocolProviderServiceSSHImpl
{
Thread.sleep(1000);
count += 1000;
- logger.trace("SSH:" + sshContact.getHostName()
+ if (logger.isTraceEnabled())
+ logger.trace("SSH:" + sshContact.getHostName()
+ ": Sleep zzz .. " );
}
@@ -435,7 +438,8 @@ public class ProtocolProviderServiceSSHImpl
sshContact.setJSch(jsch);
sshContact.setSSHSession(session);
- logger.info("A new SSH Session to " + sshContact.getHostName()
+ if (logger.isInfoEnabled())
+ logger.info("A new SSH Session to " + sshContact.getHostName()
+ " Created");
}
@@ -480,7 +484,8 @@ public class ProtocolProviderServiceSSHImpl
//one line output of testCommand
sshContact.getLine();
*/
- logger.debug("SSH: Welcome message shown");
+ if (logger.isDebugEnabled())
+ logger.debug("SSH: Welcome message shown");
}
/**
@@ -571,7 +576,8 @@ public class ProtocolProviderServiceSSHImpl
{
return;
}
- logger.trace("Killing the SSH Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the SSH Protocol Provider.");
if(isRegistered())
{
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java b/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
index f360923..cb64b81 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
@@ -76,7 +76,8 @@ public class SSHActivator
sshProviderFactory,
hashtable);
- logger.info("SSH protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("SSH protocol implementation [STARTED].");
}
/**
@@ -117,7 +118,8 @@ public class SSHActivator
{
this.sshProviderFactory.stop();
sshPpFactoryServReg.unregister();
- logger.info("SSH protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("SSH protocol implementation [STOPPED].");
}
public static ResourceManagementService getResources()
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/SSHFileTransferDaemon.java b/src/net/java/sip/communicator/impl/protocol/ssh/SSHFileTransferDaemon.java
index 226c289..1c5e81f 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/SSHFileTransferDaemon.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/SSHFileTransferDaemon.java
@@ -322,7 +322,8 @@ public class SSHFileTransferDaemon
// }
command += file.getName() + "\n";
- logger.trace(command);
+ if (logger.isTraceEnabled())
+ logger.trace(command);
scpOutputStream.write(command.getBytes());
scpOutputStream.flush();
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java
index dd6e0ea..c7dfbda 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java
@@ -277,7 +277,8 @@ public class AdHocChatRoomYahooImpl
}
catch (IOException ioe)
{
- logger.debug("Failed to invite the user: " + userAddress
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to invite the user: " + userAddress
+ " Error: " + ioe);
}
}
@@ -315,7 +316,8 @@ public class AdHocChatRoomYahooImpl
}
catch (Exception e)
{
- logger.debug("Couldn't join the chat room: "
+ if (logger.isDebugEnabled())
+ logger.debug("Couldn't join the chat room: "
+ yahooConference.getName() + e);
}
}
@@ -348,7 +350,8 @@ public class AdHocChatRoomYahooImpl
}
catch (IOException ioe)
{
- logger.debug("Failed to leave the chat room: "
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to leave the chat room: "
+ yahooConference.getName() + " Error: " + ioe);
}
@@ -383,7 +386,8 @@ public class AdHocChatRoomYahooImpl
}
catch (Exception e)
{
- logger.debug("Failed to send a conference message.");
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to send a conference message.");
}
}
@@ -443,7 +447,8 @@ public class AdHocChatRoomYahooImpl
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)
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/ContactYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/ContactYahooImpl.java
index b263ed6..01aa59a 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/ContactYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/ContactYahooImpl.java
@@ -179,7 +179,8 @@ public class ContactYahooImpl
}
catch (Exception e)
{
- logger.info("Error requesting image!", e);
+ if (logger.isInfoEnabled())
+ logger.info("Error requesting image!", e);
}
if(logger.isDebugEnabled())
@@ -196,7 +197,8 @@ public class ContactYahooImpl
protected void setImage(byte[] image)
{
if(logger.isDebugEnabled())
- logger.info("setting image " + image);
+ if (logger.isInfoEnabled())
+ logger.info("setting image " + image);
this.image = image;
}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
index dc850f0..ab38227 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
@@ -275,7 +275,8 @@ implements OperationSetAdHocMultiUserChat
String errorMessage
= "Failed to create chat room with name: " + roomName;
- logger.debug(errorMessage, e);
+ if (logger.isDebugEnabled())
+ logger.debug(errorMessage, e);
throw new OperationFailedException(errorMessage,
OperationFailedException.CHAT_ROOM_NOT_JOINED, e);
}
@@ -377,7 +378,8 @@ implements OperationSetAdHocMultiUserChat
}
catch (IOException e)
{
- logger.debug("Failed to reject Invitation: " + e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to reject Invitation: " + e);
}
}
@@ -537,7 +539,8 @@ implements OperationSetAdHocMultiUserChat
public void conferenceInviteDeclinedReceived(SessionConferenceEvent ev)
{
- logger.debug("Group Chat invite declined received. "
+ if (logger.isDebugEnabled())
+ logger.debug("Group Chat invite declined received. "
+ ev.toString());
try
{
@@ -548,13 +551,15 @@ implements OperationSetAdHocMultiUserChat
}
catch (Exception e)
{
- logger.debug("Error: " + e);
+ if (logger.isDebugEnabled())
+ logger.debug("Error: " + e);
}
}
public void conferenceInviteReceived(SessionConferenceEvent ev)
{
- logger.debug("Conference Invite Received: " + ev.toString());
+ if (logger.isDebugEnabled())
+ logger.debug("Conference Invite Received: " + ev.toString());
try
{
@@ -572,13 +577,15 @@ implements OperationSetAdHocMultiUserChat
}
catch (Exception e)
{
- logger.debug("Error: " + e);
+ if (logger.isDebugEnabled())
+ logger.debug("Error: " + e);
}
}
public void conferenceLogoffReceived(SessionConferenceEvent ev)
{
- logger.debug("Conference Logoff Received: " + ev.toString());
+ if (logger.isDebugEnabled())
+ logger.debug("Conference Logoff Received: " + ev.toString());
try
{
@@ -602,7 +609,8 @@ implements OperationSetAdHocMultiUserChat
public void conferenceLogonReceived(SessionConferenceEvent ev)
{
- logger.debug("Conference Logon Received: " + ev.toString());
+ if (logger.isDebugEnabled())
+ logger.debug("Conference Logon Received: " + ev.toString());
try
{
@@ -624,18 +632,21 @@ implements OperationSetAdHocMultiUserChat
}
catch (Exception e)
{
- logger.debug("Failed to add a user to the chat room. " + e);
+ if (logger.isDebugEnabled())
+ logger.debug("Failed to add a user to the chat room. " + e);
}
}
public void conferenceMessageReceived(SessionConferenceEvent ev)
{
- logger.debug("Conference Message Received: " + ev.toString());
+ if (logger.isDebugEnabled())
+ logger.debug("Conference Message Received: " + ev.toString());
try
{
String formattedMessage = ev.getMessage();
- logger.debug("original message received : " + formattedMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("original message received : " + formattedMessage);
// if the message is decorated by Yahoo, we try to "decode" it
// first.
@@ -656,7 +667,8 @@ implements OperationSetAdHocMultiUserChat
"(<font) (.*) size=\"(\\d+)\">",
"$1 $2 style=\"font-size: $3px;\">");
- logger.debug("formatted Message : " + formattedMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("formatted Message : " + formattedMessage);
// As no indications in the protocol is it html or not. No harm
// to set all messages html - doesn't affect the appearance of
// the gui
@@ -699,7 +711,8 @@ implements OperationSetAdHocMultiUserChat
public void connectionClosed(SessionEvent ev)
{
- logger.debug("Connection Closed: " + ev.toString());
+ if (logger.isDebugEnabled())
+ logger.debug("Connection Closed: " + ev.toString());
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
index 0ad8d20..dea60b5 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
@@ -243,7 +243,8 @@ public class OperationSetBasicInstantMessagingYahooImpl
*/
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());
@@ -292,7 +293,8 @@ public class OperationSetBasicInstantMessagingYahooImpl
if (filtered)
{
- logger.trace("Message event filtered.");
+ if (logger.isTraceEnabled())
+ logger.trace("Message event filtered.");
return;
}
@@ -379,7 +381,8 @@ public class OperationSetBasicInstantMessagingYahooImpl
if (sourceContact == null)
{
- logger.debug("received a new mail from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a new mail from an unknown contact: "
+ ev.getFrom()
+ " &lt;" + ev.getEmailAddress() + "&gt;");
//create the volatile contact
@@ -404,14 +407,16 @@ public class OperationSetBasicInstantMessagingYahooImpl
*/
private void handleNewMessage(SessionEvent ev)
{
- logger.debug("Message received : " + ev);
+ if (logger.isDebugEnabled())
+ logger.debug("Message received : " + ev);
// to keep things simple, we can decodeToText()
//String formattedMessage = processLinks(
// messageDecoder.decodeToText(ev.getMessage()));
String formattedMessage = ev.getMessage();
- logger.debug("original message received : " + formattedMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("original message received : " + formattedMessage);
// make sure we always decode message
formattedMessage = processLinks(
@@ -427,7 +432,8 @@ public class OperationSetBasicInstantMessagingYahooImpl
formattedMessage.replaceAll("(<font) (.*) size=\"(\\d+)\">",
"$1 $2 style=\"font-size: $3px;\">");
- logger.debug("formatted Message : " + formattedMessage);
+ if (logger.isDebugEnabled())
+ logger.debug("formatted Message : " + formattedMessage);
// As no indications in the protocol is it html or not. No harm
// to set all messages html - doesn't affect the appearance of the
// gui
@@ -440,7 +446,8 @@ public class OperationSetBasicInstantMessagingYahooImpl
if(sourceContact == null)
{
- logger.debug("received a message from an unknown contact: "
+ if (logger.isDebugEnabled())
+ logger.debug("received a message from an unknown contact: "
+ ev.getFrom());
//create the volatile contact
sourceContact = opSetPersPresence
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetFileTransferYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetFileTransferYahooImpl.java
index b3d092e..abacd10 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetFileTransferYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetFileTransferYahooImpl.java
@@ -434,7 +434,8 @@ public class OperationSetFileTransferYahooImpl
*/
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/yahoo/OperationSetPersistentPresenceYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java
index 25655c7..b6d0ac2 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java
@@ -434,7 +434,8 @@ public class OperationSetPersistentPresenceYahooImpl
ContactYahooImpl contact = ssContactList.findContactById(contactIdentifier);
if(contact == null)
{
- logger.info("Contact not found id :" + contactIdentifier);
+ if (logger.isInfoEnabled())
+ logger.info("Contact not found id :" + contactIdentifier);
return null;
}
else
@@ -708,7 +709,8 @@ public class OperationSetPersistentPresenceYahooImpl
*/
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("The yahoo provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("The yahoo provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
@@ -802,7 +804,8 @@ public class OperationSetPersistentPresenceYahooImpl
equals(yFriend.getId()))
{
// thats my own status
- logger.trace("Own status changed to " + yFriend.getStatus());
+ if (logger.isTraceEnabled())
+ logger.trace("Own status changed to " + yFriend.getStatus());
PresenceStatus oldStatus = currentStatus;
currentStatus =
yahooStatusToPresenceStatus(yFriend.getStatus());
@@ -831,7 +834,8 @@ public class OperationSetPersistentPresenceYahooImpl
// when old and new status are the same do nothing - no change
if(oldStatus.equals(newStatus))
{
- logger.debug("old(" + oldStatus + ") and new("+ newStatus + ") statuses are the same!");
+ if (logger.isDebugEnabled())
+ logger.debug("old(" + oldStatus + ") and new("+ newStatus + ") statuses are the same!");
return;
}
@@ -840,7 +844,8 @@ public class OperationSetPersistentPresenceYahooImpl
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);
}
@@ -850,7 +855,8 @@ public class OperationSetPersistentPresenceYahooImpl
{
public void friendsUpdateReceived(SessionFriendEvent evt)
{
- logger.debug("Received a status update for contact " + evt);
+ if (logger.isDebugEnabled())
+ logger.debug("Received a status update for contact " + evt);
if(evt.getFriend() != null)
{
@@ -908,7 +914,8 @@ public class OperationSetPersistentPresenceYahooImpl
{
if(ev.isAuthorizationRequest())
{
- logger.trace("authorizationRequestReceived from " +
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationRequestReceived from " +
ev.getFrom());
receivedAuthorizations.add(ev);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetTypingNotificationsYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetTypingNotificationsYahooImpl.java
index accd627..fecc193 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetTypingNotificationsYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetTypingNotificationsYahooImpl.java
@@ -123,7 +123,8 @@ public class OperationSetTypingNotificationsYahooImpl
*/
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)
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java
index 4c3a816..d8b7c33 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/ServerStoredContactListYahooImpl.java
@@ -157,7 +157,8 @@ public class ServerStoredContactListYahooImpl
{
//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;
}
@@ -168,7 +169,8 @@ public class ServerStoredContactListYahooImpl
, yahooProvider
, 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)
@@ -206,7 +208,8 @@ public class ServerStoredContactListYahooImpl
{
//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;
}
@@ -229,7 +232,8 @@ public class ServerStoredContactListYahooImpl
{
//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;
}
@@ -368,7 +372,8 @@ public class ServerStoredContactListYahooImpl
public void addContact(final ContactGroupYahooImpl 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
@@ -377,7 +382,8 @@ public class ServerStoredContactListYahooImpl
if( existingContact != null
&& existingContact.isPersistent() )
{
- logger.debug("Contact " + id + " already exists.");
+ if (logger.isDebugEnabled())
+ logger.debug("Contact " + id + " already exists.");
throw new OperationFailedException(
"Contact " + id + " already exists.",
OperationFailedException.SUBSCRIPTION_ALREADY_EXISTS);
@@ -409,7 +415,8 @@ public class ServerStoredContactListYahooImpl
*/
ContactYahooImpl createVolatileContact(String id)
{
- logger.trace("Creating volatile contact " + id);
+ if (logger.isTraceEnabled())
+ logger.trace("Creating volatile contact " + id);
ContactYahooImpl newVolatileContact =
new ContactYahooImpl(id, this, false, false, true);
@@ -456,7 +463,8 @@ public class ServerStoredContactListYahooImpl
ContactYahooImpl createUnresolvedContact(ContactGroup parentGroup,
String id)
{
- logger.trace("Creating unresolved contact " + id
+ if (logger.isTraceEnabled())
+ logger.trace("Creating unresolved contact " + id
+ " to parent=" + parentGroup);
ContactYahooImpl newUnresolvedContact
= new ContactYahooImpl(id, this, false, false, false);
@@ -486,7 +494,8 @@ public class ServerStoredContactListYahooImpl
if( existingGroup != null && existingGroup.isPersistent() )
{
- logger.debug("ContactGroup " + groupName + " already exists.");
+ if (logger.isDebugEnabled())
+ logger.debug("ContactGroup " + groupName + " already exists.");
throw new IllegalArgumentException(
"ContactGroup " + groupName + " already exists.");
}
@@ -511,13 +520,15 @@ public class ServerStoredContactListYahooImpl
public void createGroup(String groupName)
throws OperationFailedException
{
- logger.trace("Creating group: " + groupName);
+ if (logger.isTraceEnabled())
+ logger.trace("Creating group: " + groupName);
ContactGroupYahooImpl 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);
@@ -536,7 +547,8 @@ public class ServerStoredContactListYahooImpl
{
// to remove group just remove all the contacts in it
- logger.trace("removing group " + groupToRemove);
+ if (logger.isTraceEnabled())
+ logger.trace("removing group " + groupToRemove);
// if its not persistent group just remove it
if(!groupToRemove.isPersistent() || !groupToRemove.isResolved())
@@ -574,7 +586,8 @@ public class ServerStoredContactListYahooImpl
}
catch(IOException ex)
{
- logger.info("Cannot Remove contact " + item.getId());
+ if (logger.isInfoEnabled())
+ logger.info("Cannot Remove contact " + item.getId());
}
}
}
@@ -586,7 +599,8 @@ public class ServerStoredContactListYahooImpl
*/
void removeContact(ContactYahooImpl contactToRemove)
{
- logger.trace("Removing yahoo contact "
+ if (logger.isTraceEnabled())
+ logger.trace("Removing yahoo contact "
+ contactToRemove.getSourceContact());
if(contactToRemove.isVolatile())
@@ -607,7 +621,8 @@ public class ServerStoredContactListYahooImpl
}
catch(IOException ex)
{
- logger.info("Cannot Remove contact " + contactToRemove);
+ if (logger.isInfoEnabled())
+ logger.info("Cannot Remove contact " + contactToRemove);
}
}
@@ -626,7 +641,8 @@ public class ServerStoredContactListYahooImpl
}
catch(IOException ex)
{
- logger.info("Cannot rename group " + groupToRename);
+ if (logger.isInfoEnabled())
+ logger.info("Cannot rename group " + groupToRename);
}
fireGroupEvent(groupToRename,
@@ -710,7 +726,8 @@ public class ServerStoredContactListYahooImpl
{
//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;
}
@@ -730,7 +747,8 @@ public class ServerStoredContactListYahooImpl
{
//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;
}
@@ -746,7 +764,8 @@ public class ServerStoredContactListYahooImpl
@SuppressWarnings("unchecked") //jymsg legacy code
private void initList()
{
- logger.trace("Start init list of "
+ if (logger.isTraceEnabled())
+ logger.trace("Start init list of "
+ yahooProvider.getAccountID().getUserID());
for (YahooGroup item : yahooSession.getGroups())
@@ -778,7 +797,8 @@ public class ServerStoredContactListYahooImpl
/** @todo if something to delete . delete it */
}
- logger.trace("Init of group done! : " + group);
+ if (logger.isTraceEnabled())
+ logger.trace("Init of group done! : " + group);
}
}
@@ -893,13 +913,15 @@ public class ServerStoredContactListYahooImpl
*/
public void friendAddedReceived(SessionFriendEvent ev)
{
- logger.trace("Receive event for adding a friend : " + ev);
+ if (logger.isTraceEnabled())
+ logger.trace("Receive event for adding a friend : " + ev);
ContactGroupYahooImpl group =
findContactGroup(ev.getGroup());
if(group == null){
- logger.trace("Group not found!" + ev.getGroup());
+ if (logger.isTraceEnabled())
+ logger.trace("Group not found!" + ev.getGroup());
return;
}
@@ -976,7 +998,8 @@ public class ServerStoredContactListYahooImpl
}
catch(IOException ex)
{
- logger.info("Cannot Remove(till moving) contact :" +
+ if (logger.isInfoEnabled())
+ logger.info("Cannot Remove(till moving) contact :" +
contactToAdd + " from group " + oldParent);
}
return;
@@ -1017,7 +1040,8 @@ public class ServerStoredContactListYahooImpl
*/
public void friendRemovedReceived(SessionFriendEvent ev)
{
- logger.trace("Receive event for removing a friend : " + ev);
+ if (logger.isTraceEnabled())
+ logger.trace("Receive event for removing a friend : " + ev);
String contactID = ev.getFriend().getId();
@@ -1072,7 +1096,8 @@ public class ServerStoredContactListYahooImpl
*/
public void contactRequestReceived(SessionEvent ev)
{
- logger.info("contactRequestReceived : " + ev);
+ if (logger.isInfoEnabled())
+ logger.info("contactRequestReceived : " + ev);
if(handler == null || ev.getFrom() == null)
return;
@@ -1106,7 +1131,8 @@ public class ServerStoredContactListYahooImpl
*/
public void contactRejectionReceived(SessionEvent ev)
{
- logger.info("contactRejectionReceived : " + ev);
+ if (logger.isInfoEnabled())
+ logger.info("contactRejectionReceived : " + ev);
if(handler == null)
return;
@@ -1145,11 +1171,13 @@ public class ServerStoredContactListYahooImpl
{
if(ev.isAuthorizationAccepted())
{
- logger.trace("authorizationAccepted from " + ev.getFrom());
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationAccepted from " + ev.getFrom());
Contact srcContact = findContactById(ev.getFrom());
if(srcContact == null)
- logger.trace("No contact found");
+ if (logger.isTraceEnabled())
+ logger.trace("No contact found");
else
handler.processAuthorizationResponse(
new AuthorizationResponse(
@@ -1159,11 +1187,13 @@ public class ServerStoredContactListYahooImpl
}
else if(ev.isAuthorizationDenied())
{
- logger.trace("authorizationDenied from " + ev.getFrom());
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationDenied from " + ev.getFrom());
Contact srcContact = findContactById(ev.getFrom());
if(srcContact == null)
- logger.trace("No contact found");
+ if (logger.isTraceEnabled())
+ logger.trace("No contact found");
else
{
handler.processAuthorizationResponse(
@@ -1183,7 +1213,8 @@ public class ServerStoredContactListYahooImpl
}
else if(ev.isAuthorizationRequest())
{
- logger.trace("authorizationRequestReceived from "
+ if (logger.isTraceEnabled())
+ logger.trace("authorizationRequestReceived from "
+ ev.getFrom());
processAuthorizationRequest(ev);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/BonjourService.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/BonjourService.java
index a5370f4..142b011 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/BonjourService.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/BonjourService.java
@@ -114,7 +114,8 @@ public class BonjourService extends Thread
port = sock.getLocalPort();
- logger.debug("ZEROCONF: ServerSocket bound to port "+port);
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: ServerSocket bound to port "+port);
props.put("port.p2pj", Integer.toString(port));
this.setDaemon(true);
@@ -129,7 +130,8 @@ public class BonjourService extends Thread
*/
public void run()
{
- logger.debug("ZEROCONF: Bonjour Service Thread up and running!");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Bonjour Service Thread up and running!");
/* Put jmDNS in DEBUD Mode :
* Following verbosity levels can be chosen :
@@ -180,7 +182,8 @@ public class BonjourService extends Thread
}
}
- logger.debug("ZEROCONF: Going Offline - "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Going Offline - "
+"BonjourService Thread exiting!");
}
@@ -189,7 +192,8 @@ public class BonjourService extends Thread
*/
public void shutdown()
{
- logger.debug("ZEROCONF: Shutdown!");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Shutdown!");
dead = true;
try
@@ -240,7 +244,8 @@ public class BonjourService extends Thread
/* [new_status == OFFLINE ?] => clean up everything */
if (stat.equals(ZeroconfStatusEnum.OFFLINE))
{
- logger.debug("ZEROCONF: Going OFFLINE");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Going OFFLINE");
//jmdns.unregisterAllServices();
jmdns.removeServiceListener("_presence._tcp.local.", this);
jmdns.close();
@@ -263,7 +268,8 @@ public class BonjourService extends Thread
/* [old_status == OFFLINE ?] => register service */
else if (status.equals(ZeroconfStatusEnum.OFFLINE))
{
- logger.debug("ZEROCONF: Getting out of OFFLINE state");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Getting out of OFFLINE state");
props.put("status", stat.getStatusName());
service = new ServiceInfo("_presence._tcp.local.", id,
port, 0, 0, props);
@@ -287,7 +293,8 @@ public class BonjourService extends Thread
}
else
{
- logger.debug("ZEROCONF : Changing status");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF : Changing status");
props.put("status", stat.getStatusName());
@@ -367,7 +374,8 @@ public class BonjourService extends Thread
if (name.equals(id))
return;
- logger.debug("BONJOUR: "+name
+ if (logger.isDebugEnabled())
+ logger.debug("BONJOUR: "+name
+"["+type+"] detected! Trying to get information...");
try
{
@@ -400,7 +408,8 @@ public class BonjourService extends Thread
opSetPersPresence.changePresenceStatusForContact(contact,
ZeroconfStatusEnum.OFFLINE);
- logger.debug("BONJOUR: Received announcement that "
+ if (logger.isDebugEnabled())
+ logger.debug("BONJOUR: Received announcement that "
+name+" went offline!");
}
@@ -419,7 +428,8 @@ public class BonjourService extends Thread
String type = event.getType();
ServiceInfo info = event.getInfo();
- logger.debug("BONJOUR: Information about "
+ if (logger.isDebugEnabled())
+ logger.debug("BONJOUR: Information about "
+contactID+" discovered");
handleResolvedService(contactID, type, info);
@@ -434,7 +444,8 @@ public class BonjourService extends Thread
if (info.getAddress().toString().length() > 15)
{
- logger.debug("ZEROCONF: Temporarily ignoring IPv6 addresses!");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Temporarily ignoring IPv6 addresses!");
return;
}
@@ -444,21 +455,25 @@ public class BonjourService extends Thread
{
if (getContact(contactID, info.getAddress()) != null)
{
- logger.debug("Contact "
+ if (logger.isDebugEnabled())
+ logger.debug("Contact "
+contactID+" already in contact list! Skipping.");
return;
};
- logger.debug("ZEROCNF: ContactID " + contactID +
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCNF: ContactID " + contactID +
" Address " + info.getAddress());
- logger.debug(" Address=>"+info.getAddress()
+ if (logger.isDebugEnabled())
+ logger.debug(" Address=>"+info.getAddress()
+":"+info.getPort());
for (Iterator<String> names = info.getPropertyNames();
names.hasNext();)
{
String prop = names.next();
- logger.debug(" "+prop+"=>"
+ if (logger.isDebugEnabled())
+ logger.debug(" "+prop+"=>"
+info.getPropertyString(prop));
}
@@ -477,7 +492,8 @@ public class BonjourService extends Thread
return;
}
- logger.debug("ZEROCONF: Detected client "+name);
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Detected client "+name);
newFriend =
opSetPersPresence.createVolatileContact(
@@ -499,7 +515,8 @@ public class BonjourService extends Thread
clientType = ContactZeroconfImpl.ICHAT;
newFriend.setClientType(clientType);
- logger.debug("ZEROCONF: CLIENT TYPE "+clientType);
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: CLIENT TYPE "+clientType);
ZeroconfStatusEnum status =
ZeroconfStatusEnum.statusOf(info.getPropertyString("status"));
@@ -524,7 +541,8 @@ public class BonjourService extends Thread
long now,
DNSRecord record)
{
- logger.debug("ZEROCONF/JMDNS: Received record update for "+record);
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF/JMDNS: Received record update for "+record);
int clazz = record.getClazz();
int type = record.getType();
@@ -552,7 +570,8 @@ public class BonjourService extends Thread
}
}
- logger.debug("ZEROCONF: "+ name
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: "+ name
+ " changed status. Requesting fresh data!");
/* Since a record was updated, we can be sure that we can do a blocking
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ClientThread.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ClientThread.java
index 35da61a..b8e13c9 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ClientThread.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ClientThread.java
@@ -199,7 +199,8 @@ public class ClientThread
String temp =
str.substring(str.indexOf("<body>")+6, str.indexOf("</body>"));
- logger.debug("ZEROCONF: received message ["+temp+"]");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: received message ["+temp+"]");
int messageType = MessageZeroconfImpl.MESSAGE;
@@ -243,7 +244,8 @@ public class ClientThread
/* NORMAL MESSAGE */
case MessageZeroconfImpl.MESSAGE:
if (!isStreamOpened())
- logger.debug("ZEROCONF: client on the other side "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: client on the other side "
+"isn't polite (sending messages without "
+"saying hello :P");
if (contact == null)
@@ -272,7 +274,8 @@ public class ClientThread
case MessageZeroconfImpl.TYPING:
if (!isStreamOpened())
- logger.debug("ZEROCONF: client on the other side "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: client on the other side "
+"isn't polite (sending messages without "
+"saying hello :P");
if (contact == null)
@@ -423,12 +426,14 @@ public class ClientThread
*/
public void sendMessage(MessageZeroconfImpl msg)
{
- logger.debug("ZEROCONF: Sending messag ["
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Sending messag ["
+msg.getContent()+"] to "
+ contact.getDisplayName());
if (!isStreamOpened())
{
- logger.debug("ZEROCONF: Stream not opened... "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Stream not opened... "
+"will send the message later");
messagesQueue += toXHTML(msg);
}
@@ -440,7 +445,8 @@ public class ClientThread
*/
public void run()
{
- logger.debug("Bonjour: NEW CONNEXION from "
+ if (logger.isDebugEnabled())
+ logger.debug("Bonjour: NEW CONNEXION from "
+ sock.getInetAddress().getCanonicalHostName()
+" / "+sock.getInetAddress().getHostAddress());
String input;
@@ -456,7 +462,8 @@ public class ClientThread
msg = parseMessage(input);
}
- logger.debug("ZEROCONF : OUT OF LOOP !! Closed chat.");
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF : OUT OF LOOP !! Closed chat.");
cleanThread();
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java
index a73ed70..1205dfd 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetBasicInstantMessagingZeroconfImpl.java
@@ -100,7 +100,8 @@ public class OperationSetBasicInstantMessagingZeroconfImpl
if (thread == null)
{
Socket sock;
- logger.debug("ZEROCONF: Creating a chat connexion to "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF: Creating a chat connexion to "
+to.getIpAddress()+":"+to.getPort());
sock = new Socket(to.getIpAddress(), to.getPort());
thread = new ClientThread(sock, to.getBonjourService());
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java
index 3959ec7..cc598e4 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/OperationSetPersistentPresenceZeroconfImpl.java
@@ -712,7 +712,8 @@ public class OperationSetPersistentPresenceZeroconfImpl
public void registrationStateChanged(RegistrationStateChangeEvent evt)
{
- logger.debug("ZEROCONF : The Zeroconf provider changed state from: "
+ if (logger.isDebugEnabled())
+ logger.debug("ZEROCONF : The Zeroconf provider changed state from: "
+ evt.getOldState()
+ " to: " + evt.getNewState());
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java
index fba8b40..f9bebe2 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderServiceZeroconfImpl.java
@@ -62,7 +62,8 @@ public class ProtocolProviderServiceZeroconfImpl
*/
public ProtocolProviderServiceZeroconfImpl()
{
- logger.trace("Creating a zeroconf provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Creating a zeroconf provider.");
}
/**
@@ -184,7 +185,8 @@ public class ProtocolProviderServiceZeroconfImpl
//ICI : creer le service Zeroconf !!
- logger.info("ZEROCONF: Starting the service");
+ if (logger.isInfoEnabled())
+ logger.info("ZEROCONF: Starting the service");
this.bonjourService = new BonjourService(5298, this);
//bonjourService.changeStatus(ZeroconfStatusEnum.ONLINE);
@@ -207,7 +209,8 @@ public class ProtocolProviderServiceZeroconfImpl
{
return;
}
- logger.trace("Killing the Zeroconf Protocol Provider.");
+ if (logger.isTraceEnabled())
+ logger.trace("Killing the Zeroconf Protocol Provider.");
if(isRegistered())
{
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
index 191ca0a..dcf0655 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
@@ -71,7 +71,8 @@ public class ZeroconfActivator
zeroconfProviderFactory,
hashtable);
- logger.info("Zeroconf protocol implementation [STARTED].");
+ if (logger.isInfoEnabled())
+ logger.info("Zeroconf protocol implementation [STARTED].");
}
/**
@@ -112,6 +113,7 @@ public class ZeroconfActivator
zeroconfProviderFactory.stop();
zeroconfPpFactoryServReg.unregister();
- logger.info("Zeroconf protocol implementation [STOPPED].");
+ if (logger.isInfoEnabled())
+ logger.info("Zeroconf protocol implementation [STOPPED].");
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/DNSCache.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/DNSCache.java
index f6608f7..03706b0 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/DNSCache.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/DNSCache.java
@@ -4,7 +4,7 @@
package net.java.sip.communicator.impl.protocol.zeroconf.jmdns;
import java.util.*;
-import java.util.logging.*;
+import net.java.sip.communicator.util.*;
/**
* A table of DNS entries. This is a hash table which
@@ -84,9 +84,10 @@ class DNSCache
public CacheNode(DNSEntry value)
{
this.value = value;
- String SLevel = System.getProperty("jmdns.debug");
- if (SLevel == null) SLevel = "INFO";
- logger.setLevel(Level.parse(SLevel));
+// String SLevel = System.getProperty("jmdns.debug");
+// if (SLevel == null)
+// SLevel = "INFO";
+// logger.setLevel(Level.parse(SLevel));
}
public CacheNode next()
@@ -109,9 +110,9 @@ class DNSCache
{
hashtable = new HashMap<String, CacheNode>(size);
- String SLevel = System.getProperty("jmdns.debug");
- if (SLevel == null) SLevel = "INFO";
- logger.setLevel(Level.parse(SLevel));
+// String SLevel = System.getProperty("jmdns.debug");
+// if (SLevel == null) SLevel = "INFO";
+// logger.setLevel(Level.parse(SLevel));
}
/**
@@ -256,7 +257,8 @@ class DNSCache
{
for (CacheNode n = i.next(); n != null; n = n.next)
{
- logger.info(n.value.toString());
+ if (logger.isInfoEnabled())
+ logger.info(n.value.toString());
}
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/JmDNS.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/JmDNS.java
index 30ac500..1f19c42 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/JmDNS.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/jmdns/JmDNS.java
@@ -166,7 +166,8 @@ public class JmDNS
{
//String SLevel = System.getProperty("jmdns.debug");
- logger.debug("JmDNS instance created");
+ if (logger.isDebugEnabled())
+ logger.debug("JmDNS instance created");
try
{
InetAddress addr = InetAddress.getLocalHost();
@@ -279,7 +280,8 @@ public class JmDNS
private void closeMulticastSocket()
{
- logger.debug("closeMulticastSocket()");
+ if (logger.isDebugEnabled())
+ logger.debug("closeMulticastSocket()");
if (socket != null)
{
// close socket
@@ -642,7 +644,8 @@ public class JmDNS
{
logger.error(e.getMessage(), e);
}
- logger.debug("registerService() JmDNS registered service as " + info);
+ if (logger.isDebugEnabled())
+ logger.debug("registerService() JmDNS registered service as " + info);
}
/**
@@ -686,7 +689,8 @@ public class JmDNS
*/
public void unregisterAllServices()
{
- logger.debug("unregisterAllServices()");
+ if (logger.isDebugEnabled())
+ logger.debug("unregisterAllServices()");
if (services.size() == 0)
{
return;
@@ -779,7 +783,8 @@ public class JmDNS
DNSRecord.Service s = (DNSRecord.Service) a;
if (s.port != info.port || !s.server.equals(localHost.getName()))
{
- logger.debug("makeServiceNameUnique() " +
+ if (logger.isDebugEnabled())
+ logger.debug("makeServiceNameUnique() " +
"JmDNS.makeServiceNameUnique srv collision:" +
a + " s.server=" + s.server + " " +
localHost.getName() + " equals:" +
@@ -958,11 +963,13 @@ public class JmDNS
boolean hostConflictDetected = false;
boolean serviceConflictDetected = false;
- logger.trace("JMDNS/handleResponse received " +
+ if (logger.isTraceEnabled())
+ logger.trace("JMDNS/handleResponse received " +
msg.answers.size()+ " messages");
for (DNSRecord rec : msg.answers)
{
- logger.trace("PRINT: "+ rec);
+ if (logger.isTraceEnabled())
+ logger.trace("PRINT: "+ rec);
//cache.add(rec);
}
@@ -971,13 +978,15 @@ public class JmDNS
boolean isInformative = false;
boolean expired = rec.isExpired(now);
- logger.trace("JMDNS received : " + rec + " expired: "+expired);
+ if (logger.isTraceEnabled())
+ logger.trace("JMDNS received : " + rec + " expired: "+expired);
// update the cache
DNSRecord c = (DNSRecord) cache.get(rec);
if (c != null)
{
- logger.trace("JMDNS has found "+rec+" in cache");
+ if (logger.isTraceEnabled())
+ logger.trace("JMDNS has found "+rec+" in cache");
if (expired)
{
isInformative = true;
@@ -994,7 +1003,8 @@ public class JmDNS
// isInformative = true;
// c.resetTTL(rec);
// rec = c;
- logger.trace(
+ if (logger.isTraceEnabled())
+ logger.trace(
new Boolean(c.isUnique()).toString() +
c.getType()+c.getClazz() + "/" +
DNSConstants.TYPE_TXT + " "+DNSConstants.CLASS_IN);
@@ -1003,7 +1013,8 @@ public class JmDNS
&& ((rec.getType() & DNSConstants.TYPE_TXT) != 0)
&& ((rec.getClazz() & DNSConstants.CLASS_IN) != 0)))
{
- logger.trace("UPDATING CACHE !! ");
+ if (logger.isTraceEnabled())
+ logger.trace("UPDATING CACHE !! ");
isInformative = true;
cache.remove(c);
cache.add(rec);
@@ -1020,7 +1031,8 @@ public class JmDNS
if (!expired)
{
isInformative = true;
- logger.trace("Adding "+rec+" to the cache");
+ if (logger.isTraceEnabled())
+ logger.trace("Adding "+rec+" to the cache");
cache.add(rec);
}
}
@@ -1165,7 +1177,8 @@ public class JmDNS
try
{
DNSIncoming msg = new DNSIncoming(packet);
- logger.trace("send() JmDNS out:" + msg.print(true));
+ if (logger.isTraceEnabled())
+ logger.trace("send() JmDNS out:" + msg.print(true));
}
catch (IOException exc)
{
@@ -1204,7 +1217,8 @@ public class JmDNS
}
DNSIncoming msg = new DNSIncoming(packet);
- logger.trace("SocketListener.run() JmDNS in:" +
+ if (logger.isTraceEnabled())
+ logger.trace("SocketListener.run() JmDNS in:" +
msg.print(true));
synchronized (ioLock)
@@ -1263,7 +1277,8 @@ public class JmDNS
{
return;
}
- logger.trace("run() JmDNS reaping cache");
+ if (logger.isTraceEnabled())
+ logger.trace("run() JmDNS reaping cache");
// Remove expired answers from the cache
// -------------------------------------
@@ -1444,7 +1459,8 @@ public class JmDNS
info.task == this)
{
info.advanceState();
- logger.debug("run() JmDNS probing " +
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS probing " +
info.getQualifiedName() + " state " +
info.getState());
@@ -1473,7 +1489,8 @@ public class JmDNS
}
if (out != null)
{
- logger.debug("run() JmDNS probing #" + taskState);
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS probing #" + taskState);
send(out);
}
else
@@ -1612,7 +1629,8 @@ public class JmDNS
if (info.getState() == taskState && info.task == this)
{
info.advanceState();
- logger.debug("run() JmDNS announcing " +
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS announcing " +
info.getQualifiedName() +
" state " + info.getState());
@@ -1651,7 +1669,8 @@ public class JmDNS
}
if (out != null)
{
- logger.debug("run() JmDNS announcing #" + taskState);
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS announcing #" + taskState);
send(out);
}
else
@@ -1783,7 +1802,8 @@ public class JmDNS
if (info.getState() == taskState && info.task == this)
{
info.advanceState();
- logger.debug("run() JmDNS announced " +
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS announced " +
info.getQualifiedName() + " state " + info.getState());
if (out == null)
@@ -1821,7 +1841,8 @@ public class JmDNS
}
if (out != null)
{
- logger.debug("run() JmDNS announced");
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS announced");
send(out);
}
else
@@ -1881,7 +1902,8 @@ public class JmDNS
if (entry instanceof DNSQuestion)
{
DNSQuestion q = (DNSQuestion) entry;
- logger.trace("start() question=" + q);
+ if (logger.isTraceEnabled())
+ logger.trace("start() question=" + q);
iAmTheOnlyOne &= (q.type == DNSConstants.TYPE_SRV
|| q.type == DNSConstants.TYPE_TXT
|| q.type == DNSConstants.TYPE_A
@@ -1905,7 +1927,8 @@ public class JmDNS
{
delay = 0;
}
- logger.trace("start() Responder chosen delay=" + delay);
+ if (logger.isTraceEnabled())
+ logger.trace("start() Responder chosen delay=" + delay);
timer.schedule(this, delay);
}
@@ -2138,7 +2161,8 @@ public class JmDNS
if (knownAnswer.ttl > DNSConstants.DNS_TTL / 2 &&
answers.remove(knownAnswer))
{
- logger.debug(
+ if (logger.isDebugEnabled())
+ logger.debug(
"JmDNS Responder Known Answer Removed");
}
}
@@ -2147,7 +2171,8 @@ public class JmDNS
// responde if we have answers
if (answers.size() != 0)
{
- logger.debug("run() JmDNS responding");
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS responding");
DNSOutgoing out = null;
if (isUnicast)
{
@@ -2211,7 +2236,8 @@ public class JmDNS
{
if (count++ < 3)
{
- logger.debug("run() JmDNS querying type");
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS querying type");
DNSOutgoing out =
new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
out.addQuestion(
@@ -2289,7 +2315,8 @@ public class JmDNS
{
if (count++ < 3)
{
- logger.debug("run() JmDNS querying service");
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS querying service");
long now = System.currentTimeMillis();
DNSOutgoing out =
new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
@@ -2511,7 +2538,8 @@ public class JmDNS
{
if (++count < 3)
{
- logger.debug("run() JmDNS canceling service");
+ if (logger.isDebugEnabled())
+ logger.debug("run() JmDNS canceling service");
// announce the service
//long now = System.currentTimeMillis();
DNSOutgoing out =
@@ -2581,7 +2609,8 @@ public class JmDNS
*/
protected void recover()
{
- logger.debug("recover()");
+ if (logger.isDebugEnabled())
+ logger.debug("recover()");
// We have an IO error so lets try to recover if anything happens lets close it.
// This should cover the case of the IP address changing under our feet
if (DNSState.CANCELED != state)
@@ -2589,7 +2618,8 @@ public class JmDNS
synchronized (this)
{ // Synchronize only if we are not already in process to prevent dead locks
//
- logger.debug("recover() Cleanning up");
+ if (logger.isDebugEnabled())
+ logger.debug("recover() Cleanning up");
// Stop JmDNS
state = DNSState.CANCELED; // This protects against recursive calls
@@ -2604,7 +2634,8 @@ public class JmDNS
closeMulticastSocket();
//
cache.clear();
- logger.debug("recover() All is clean");
+ if (logger.isDebugEnabled())
+ logger.debug("recover() All is clean");
//
// All is clear now start the services
//
@@ -2652,9 +2683,11 @@ public class JmDNS
*/
void print()
{
- logger.info("---- cache ----\n");
+ if (logger.isInfoEnabled())
+ logger.info("---- cache ----\n");
cache.print();
- logger.info("\n");
+ if (logger.isInfoEnabled())
+ logger.info("\n");
}
/**
@@ -2664,7 +2697,8 @@ public class JmDNS
public void printServices()
{
- logger.info(toString());
+ if (logger.isInfoEnabled())
+ logger.info(toString());
}
public String toString()
@@ -2769,7 +2803,8 @@ public class JmDNS
*/
private void disposeServiceCollectors()
{
- logger.debug("disposeServiceCollectors()");
+ if (logger.isDebugEnabled())
+ logger.debug("disposeServiceCollectors()");
synchronized (serviceCollectors)
{
for (Iterator<ServiceCollector> i = serviceCollectors.values().iterator(); i.hasNext();)
@@ -2903,7 +2938,8 @@ public class JmDNS
synchronized (info)
{
- logger.debug("updateInfos() JmDNS updating " +
+ if (logger.isDebugEnabled())
+ logger.debug("updateInfos() JmDNS updating " +
info.getQualifiedName() + " state " +
info.getState());
@@ -2950,7 +2986,8 @@ public class JmDNS
DNSConstants.DNS_TTL,
info.text), 0);
- logger.debug("updateInfos() JmDNS updated infos for "+info);
+ if (logger.isDebugEnabled())
+ logger.debug("updateInfos() JmDNS updated infos for "+info);
send(out);
Thread.sleep(1000);