Adds debug logging for msofficecomm plugin.

ice4sip
Damian Minkov 12 years ago
parent df93dec8f7
commit 052f8fba05

@ -399,7 +399,7 @@ private static int getMPHONE_TYPESortOrder(int mphonetype)
* @param messengerContact a <tt>MessengerContact</tt> instance which
* specifies the contact for which the phone number information is to be
* retrieved
* @param a member of the <tt>MPHONE_TYPE</tt> enumerated type which
* @param type member of the <tt>MPHONE_TYPE</tt> enumerated type which
* specifies the type of the phone number information to be retrieved
* @return the phone number information of the contact associated with the
* specified <tt>messengerContact</tt>
@ -508,6 +508,9 @@ static int getStatus(MessengerContact messengerContact)
String signinName = messengerContact.signinName;
ProtocolPresenceStatus presenceStatus;
if(logger.isTraceEnabled())
logger.trace("Got getStatus for " + signinName);
if (signinName == null)
presenceStatus = null;
else
@ -658,6 +661,9 @@ static synchronized void start(BundleContext bundleContext)
serviceReference));
}
}
if (logger.isInfoEnabled())
logger.info("Messenger [REGISTERED] as service listener.");
}
/**
@ -710,6 +716,11 @@ public void startConversation(
String[] participants,
String conversationData)
{
if(logger.isTraceEnabled())
logger.trace("Got startConversation participants:"
+ participants == null? "" : Arrays.asList(participants)
+ ", conversationData=" + conversationData);
/*
* Firstly, resolve the participants into Contacts which may include
* looking up their vCards.

@ -17,6 +17,13 @@
public class MsOfficeCommActivator
implements BundleActivator
{
/**
* The <tt>Logger</tt> used by the <tt>MsOfficeCommActivator</tt> class and
* its instances for logging output.
*/
private static final Logger logger
= Logger.getLogger(MsOfficeCommActivator.class);
/**
* Starts the <tt>msofficecomm</tt> bundle in a specific
* {@link BundleContext}.
@ -33,6 +40,9 @@ public void start(BundleContext bundleContext)
if (!OSUtils.IS_WINDOWS)
return;
if (logger.isInfoEnabled())
logger.info("MsOfficeComm plugin ... [STARTED]");
Messenger.start(bundleContext);
boolean stopMessenger = true;
@ -41,6 +51,10 @@ public void start(BundleContext bundleContext)
{
int hresult = OutOfProcessServer.start();
if(logger.isInfoEnabled())
logger.info("MsOfficeComm started OutOfProcessServer HRESULT:"
+ hresult);
if (hresult < 0)
throw new RuntimeException("HRESULT " + hresult);
else
@ -80,5 +94,8 @@ public void stop(BundleContext bundleContext)
{
Messenger.stop(bundleContext);
}
if (logger.isInfoEnabled())
logger.info("MsOfficeComm plugin ... [UNREGISTERED]");
}
}

Loading…
Cancel
Save