X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FMessageManager.java;h=1cfe0c67543ce48258f6635d31d8783bc99e1d03;hb=507f8f9e119ce89ba04aea3b3d814cbe58f3d686;hp=66d8f9f3b199ac5ffd08d7518f3accb29896ed3b;hpb=9fe513b9503362720ee97b2e05d33df399cfd55c;p=jalview.git diff --git a/src/jalview/util/MessageManager.java b/src/jalview/util/MessageManager.java index 66d8f9f..1cfe0c6 100644 --- a/src/jalview/util/MessageManager.java +++ b/src/jalview/util/MessageManager.java @@ -24,8 +24,10 @@ import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; import java.util.ResourceBundle.Control; -import java.util.logging.Level; -import java.util.logging.Logger; +//import java.util.logging.Level; +//import java.util.logging.Logger; + +import org.apache.log4j.Logger; /** * @@ -37,6 +39,8 @@ import java.util.logging.Logger; public class MessageManager { + // BH 2018 switched to org.apache.llog4j.Logger + private static ResourceBundle rb; private static Logger log = Logger @@ -55,19 +59,19 @@ public class MessageManager log.info("Getting messages for lang: " + loc); Control control = Control.getControl(Control.FORMAT_PROPERTIES); rb = ResourceBundle.getBundle("lang.Messages", loc, control); - if (log.isLoggable(Level.FINEST)) - { - // this might take a while, so we only do it if it will be shown - log.finest("Language keys: " + rb.keySet()); - } + // if (log.isLoggable(Level.FINEST)) + // { + // // this might take a while, so we only do it if it will be shown + // log.info("Language keys: " + rb.keySet()); // was FINEST + // } } catch (Exception q) { - log.warning("Exception when initting Locale for i18n messages\n" + log.warn("Exception when initting Locale for i18n messages\n" + q.getMessage()); q.printStackTrace(); } catch (Error v) { - log.warning("Error when initting Locale for i18n messages\n" + log.warn("Error when initting Locale for i18n messages\n" + v.getMessage()); v.printStackTrace(); } @@ -82,7 +86,7 @@ public class MessageManager value = rb.getString(key); } catch (Exception e) { - log.warning("I18N missing: " + loc + "\t" + key); + log.warn("I18N missing: " + loc + "\t" + key); } return value; } @@ -121,8 +125,8 @@ public class MessageManager name = rb.getString(smkey); } catch (Exception x) { - log.finest("I18N missing key with root " + keyroot + ": " + loc + "\t" - + smkey); + log.info("I18N missing key with root " + keyroot + ": " + loc + "\t" + + smkey); // was FINEST } return name; }