git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1713 update from Jalview 2.11.3 develop
[jalview.git]
/
src
/
jalview
/
util
/
MessageManager.java
diff --git
a/src/jalview/util/MessageManager.java
b/src/jalview/util/MessageManager.java
index
ba7da10
..
acd4591
100644
(file)
--- a/
src/jalview/util/MessageManager.java
+++ b/
src/jalview/util/MessageManager.java
@@
-27,7
+27,7
@@
import java.util.ResourceBundle;
import java.util.ResourceBundle.Control;
import java.util.Set;
import java.util.ResourceBundle.Control;
import java.util.Set;
-import org.apache.log4j.Logger;
+import jalview.log.JLoggerLog4j;
/**
*
/**
*
@@
-40,8
+40,7
@@
public class MessageManager
{
private static ResourceBundle rb;
{
private static ResourceBundle rb;
- // BH 2018 switched to org.apache.llog4j.Logger
- private static Logger log = Logger
+ private static JLoggerLog4j log = JLoggerLog4j
.getLogger(MessageManager.class.getCanonicalName());
private static Locale loc;
.getLogger(MessageManager.class.getCanonicalName());
private static Locale loc;
@@
-94,7
+93,7
@@
public class MessageManager
} catch (Exception e)
{
String msg = "I18N missing: " + loc + "\t" + key;
} catch (Exception e)
{
String msg = "I18N missing: " + loc + "\t" + key;
- logWarning(key, msg);
+ logWarning(key, msg);
}
return value;
}
}
return value;
}
@@
-162,15
+161,16
@@
public class MessageManager
*/
public static String getStringOrReturn(String keyroot, String name)
{
*/
public static String getStringOrReturn(String keyroot, String name)
{
- String smkey = keyroot + name.toLowerCase(Locale.ROOT).replaceAll(" ", "");
+ String smkey = keyroot
+ + name.toLowerCase(Locale.ROOT).replaceAll(" ", "");
try
{
name = rb.getString(smkey);
} catch (Exception x)
{
try
{
name = rb.getString(smkey);
} catch (Exception x)
{
- String msg = "I18N missing key with root " + keyroot + ": " + loc + "\t"
- + smkey;
- logWarning(smkey, msg);
+ String msg = "I18N missing key with root " + keyroot + ": " + loc
+ + "\t" + smkey;
+ logWarning(smkey, msg);
}
return name;
}
}
return name;
}
@@
-181,12
+181,12
@@
public class MessageManager
* @param key
* @param msg
*/
* @param key
* @param msg
*/
- private static void logWarning(String key, String msg)
+ private static void logWarning(String key, String msg)
{
{
- if (!reportedMissing.contains(key))
- {
+ if (!reportedMissing.contains(key))
+ {
reportedMissing.add(key);
reportedMissing.add(key);
- log.info(msg);
- }
+ log.info(msg);
+ }
}
}
}
}