package org.sitoolkit.util.tabledata;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MessageManager {

    private static final Logger LOG = LoggerFactory.getLogger(MessageManager.class);

    private static ResourceBundle resource;

    private static ResourceBundle getResource() {
        if (resource == null) {
            String baseName = MessageManager.class.getPackage().getName().replace(".", "/")
                    + "/message";
            resource = ResourceBundle.getBundle(baseName);
        }
        return resource;
    }

    public static String getMessage(String key) {
        try {
            return getResource().getString(key);
        } catch (MissingResourceException e) {
            LOG.warn("{}", e.getMessage());
        }
        return "!! messing resource !!";
    }
}

@@ -820,16 +820,27 @@
 G.warn(%22
+%7B%7D, locale 
 %7B%7D%22, e.g
@@ -850,16 +850,43 @@
 essage()
+, getResource().getLocale()
 );%0A     
@@ -937,10 +937,11 @@
 ;%0A    %7D%0A
+%0A
 %7D%0A

add detail log message