Upgrading to GitLab 11.11.0.

Commit 640e2580 authored by Mickaël Guessant's avatar Mickaël Guessant

Add a few more logging statements

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2337 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 27e9e357
...@@ -224,8 +224,17 @@ public final class DavGatewayTray { ...@@ -224,8 +224,17 @@ public final class DavGatewayTray {
* Create tray icon and register frame listeners. * Create tray icon and register frame listeners.
*/ */
public static void init() { public static void init() {
String currentDesktop = System.getenv("XDG_CURRENT_DESKTOP");
String javaVersion = System.getProperty("java.version");
String arch = System.getProperty("sun.arch.data.model");
LOGGER.debug("OS Name: "+System.getProperty("os.name")+
"Java version: "+javaVersion+((arch!=null)? ' ' +arch:"")+
"System tray "+(SystemTray.isSupported()?"":"not ")+"supported"+
((currentDesktop==null)?"":"Current Desktop: " + currentDesktop)
);
if (!Settings.getBooleanProperty("davmail.server")) { if (!Settings.getBooleanProperty("davmail.server")) {
// first try to load SWT before with Java // first try to load SWT before with Java AWT
ClassLoader classloader = DavGatewayTray.class.getClassLoader(); ClassLoader classloader = DavGatewayTray.class.getClassLoader();
try { try {
// trigger ClassNotFoundException // trigger ClassNotFoundException
...@@ -283,6 +292,9 @@ public final class DavGatewayTray { ...@@ -283,6 +292,9 @@ public final class DavGatewayTray {
try { try {
ClassLoader classloader = DavGatewayTray.class.getClassLoader(); ClassLoader classloader = DavGatewayTray.class.getClassLoader();
URL imageUrl = classloader.getResource(fileName); URL imageUrl = classloader.getResource(fileName);
if (imageUrl == null) {
throw new IOException("Missing resource: "+fileName);
}
result = ImageIO.read(imageUrl); result = ImageIO.read(imageUrl);
} catch (IOException e) { } catch (IOException e) {
DavGatewayTray.warn(new BundleMessage("LOG_UNABLE_TO_LOAD_IMAGE"), e); DavGatewayTray.warn(new BundleMessage("LOG_UNABLE_TO_LOAD_IMAGE"), e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment