diff options
author | hristoterezov <hristo@jitsi.org> | 2014-04-28 17:00:25 +0300 |
---|---|---|
committer | hristoterezov <hristo@jitsi.org> | 2014-04-28 17:00:25 +0300 |
commit | f264230de7944a28b75a1e0af6cb444f60f39abb (patch) | |
tree | c88c4711c6ccb02c7fbf7c3676f5b967ec0b1b48 /src/net/java/sip/communicator/plugin/addrbook | |
parent | d9917f1e79060a1e95c4ef57eb14f454a8d8db0b (diff) | |
download | jitsi-f264230de7944a28b75a1e0af6cb444f60f39abb.zip jitsi-f264230de7944a28b75a1e0af6cb444f60f39abb.tar.gz jitsi-f264230de7944a28b75a1e0af6cb444f60f39abb.tar.bz2 |
Fixes issue with Outlook COM server arguments and implements logger level for the native logger.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/addrbook')
-rw-r--r-- | src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java index 4da53a0..93db055 100644 --- a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java +++ b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java @@ -51,6 +51,10 @@ public class MsOutlookAddrBookContactSourceService private static final long MAPI_INIT_VERSION = 0; private static final long MAPI_MULTITHREAD_NOTIFICATIONS = 0x00000001; + + private static final int NATIVE_LOGGER_LEVEL_INFO = 0; + + private static final int NATIVE_LOGGER_LEVEL_TRACE = 1; /** * The thread used to collect the notifications. @@ -129,25 +133,31 @@ public class MsOutlookAddrBookContactSourceService if(!isMAPIInitialized) { String logFileName = ""; + String homeLocation = System.getProperty( + "net.java.sip.communicator.SC_LOG_DIR_LOCATION"); + String dirName = System.getProperty( + "net.java.sip.communicator.SC_HOME_DIR_NAME"); + + if(homeLocation != null && dirName != null) + { + logFileName = homeLocation + "\\" + dirName + "\\log\\"; + } + + int logLevel = NATIVE_LOGGER_LEVEL_INFO; if(logger.isTraceEnabled()) { - String homeLocation = System.getProperty( - "net.java.sip.communicator.SC_LOG_DIR_LOCATION"); - String dirName = System.getProperty( - "net.java.sip.communicator.SC_HOME_DIR_NAME"); - - if(homeLocation != null && dirName != null) - { - logFileName = homeLocation + "\\" + dirName - + "\\log\\"; - } + logLevel = NATIVE_LOGGER_LEVEL_TRACE; } - + + logger.info("Init mapi with log level " + logLevel + " and log file" + + " path " + logFileName); + MAPIInitialize( MAPI_INIT_VERSION, MAPI_MULTITHREAD_NOTIFICATIONS, notificationDelegate, - logFileName); + logFileName, + logLevel); isMAPIInitialized = true; } } @@ -191,7 +201,8 @@ public class MsOutlookAddrBookContactSourceService long version, long flags, NotificationsDelegate callback, - String logFileName) + String logFileName, + int logLevel) throws MsOutlookMAPIHResultException; /** |