X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=f4c88543a307ddb5c22067d4ac1fd148c17ffa32;hb=1d1edb58c9ee8baec12686a512eb18d97b9bdba1;hp=04cf1ecb17dc06cb54262aa938ef9ace5b29333c;hpb=5cfef671be8362cbb0598ea405a10f96e08a4df3;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 04cf1ec..f4c8854 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -383,10 +383,13 @@ public class Cache { // props file provided as URL fis = new URL(propertiesFile).openStream(); - System.out.println( - "Loading jalview properties from : " + propertiesFile); - System.out.println( - "Disabling Jalview writing to user's local properties file."); + if (!Jalview.quiet()) + { + System.out.println( + "Loading jalview properties from : " + propertiesFile); + System.out.println( + "Disabling Jalview writing to user's local properties file."); + } propsAreReadOnly = true; } catch (Exception ex) { @@ -414,7 +417,8 @@ public class Cache fis.close(); } catch (Exception ex) { - System.out.println("Error reading properties file: " + ex); + if (!Jalview.quiet()) + System.out.println("Error reading properties file: " + ex); } } @@ -470,7 +474,8 @@ public class Cache } } catch (Exception ex) { - System.out.println("Error reading author details: " + ex); + if (!Jalview.quiet()) + System.out.println("Error reading author details: " + ex); authorDetails = null; } if (authorDetails == null) @@ -533,8 +538,8 @@ public class Cache if (orgtimeout == null) { orgtimeout = "30"; - System.out.println("# INFO: Setting default net timeout to " - + orgtimeout + " seconds."); + Console.debug("Setting default net timeout to " + orgtimeout + + " seconds."); } String remoteVersion = null; if (remoteBuildPropertiesUrl.startsWith("http")) @@ -554,10 +559,13 @@ public class Cache remoteVersion = remoteBuildProperties.getProperty("VERSION"); } catch (Exception ex) { - System.out.println( - "Non-fatal exception when checking version at " - + remoteBuildPropertiesUrl + ":"); - System.out.println(ex); + if (!Jalview.quiet()) + { + System.out.println( + "Non-fatal exception when checking version at " + + remoteBuildPropertiesUrl + ":"); + System.out.println(ex); + } remoteVersion = getProperty("VERSION"); } } @@ -656,7 +664,8 @@ public class Cache } } catch (Exception ex) { - System.out.println("Error reading build details: " + ex); + if (!Jalview.quiet()) + System.out.println("Error reading build details: " + ex); applicationProperties.remove("VERSION"); } String codeVersion = getProperty("VERSION"); @@ -677,7 +686,7 @@ public class Cache if (printVersion && reportVersion) { System.out.println(ChannelProperties.getProperty("app_name") - + " Version: " + codeVersion + codeInstallation); + + " version: " + codeVersion + codeInstallation); } } @@ -738,8 +747,9 @@ public class Cache def = Integer.parseInt(string); } catch (NumberFormatException e) { - System.out.println("Error parsing int property '" + property - + "' with value '" + string + "'"); + if (!Jalview.quiet()) + System.out.println("Error parsing int property '" + property + + "' with value '" + string + "'"); } } @@ -780,8 +790,9 @@ public class Cache } } catch (Exception ex) { - System.out.println( - "Error setting property: " + key + " " + obj + "\n" + ex); + if (!Jalview.quiet()) + System.out.println( + "Error setting property: " + key + " " + obj + "\n" + ex); } return oldValue; } @@ -811,7 +822,8 @@ public class Cache out.close(); } catch (Exception ex) { - System.out.println("Error saving properties: " + ex); + if (!Jalview.quiet()) + System.out.println("Error saving properties: " + ex); } } } @@ -1149,7 +1161,8 @@ public class Cache } } catch (Exception ex) { - System.out.println("Error loading User ColourFile\n" + ex); + if (!Jalview.quiet()) + System.out.println("Error loading User ColourFile\n" + ex); } } if (!files.equals(coloursFound.toString()))