import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
-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;
/**
*
public class MessageManager
{
+ // BH 2018 switched to org.apache.llog4j.Logger
+
private static ResourceBundle rb;
private static Logger log = Logger
/* Getting messages for GV */
log.info("Getting messages for lang: " + loc);
rb = ResourceBundle.getBundle("lang.Messages", loc);
- 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();
}
value = rb.getString(key);
} catch (Exception e)
{
- log.warning("I18N missing: " + loc + "\t" + key);
+ log.warn("I18N missing: " + loc + "\t" + key);
}
return value;
}
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;
}