Commits

Anonymous committed 7d3849e

Shouldn't LocalizedTextUtil's log level be raised?
Issue number: XW-277
Obtained from:
Submitted by: Eugene Schava
Reviewed by: Rainer Hermanns

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@833e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/util/LocalizedTextUtil.java

  *
  * @author Jason Carreira
  * @author Mark Woon
+ * @author Rainer Hermanns
  */
 public class LocalizedTextUtil {
 
             }
         }
 
+        String result = null;
         // get default
         if (indexedTextName == null) {
-            return getDefaultMessage(aTextName, locale, valueStack, args, defaultMessage);
+            result = getDefaultMessage(aTextName, locale, valueStack, args, defaultMessage);
         } else {
             msg = getDefaultMessage(aTextName, locale, valueStack, args, null);
 
                 return msg;
             }
 
-            return getDefaultMessage(indexedTextName, locale, valueStack, args, defaultMessage);
+            result = getDefaultMessage(indexedTextName, locale, valueStack, args, defaultMessage);
         }
+        if ( result != null && result.equals(defaultMessage)) {
+            LOG.warn("Unable to find text for key " + aTextName);
+        }
+        return result;
     }
 
     /**
         } catch (MissingResourceException ex) {
         }
 
-        return getDefaultMessage(aTextName, locale, valueStack, args, defaultMessage);
+        String result = getDefaultMessage(aTextName, locale, valueStack, args, defaultMessage);
+        if ( result != null && result.equals(defaultMessage)) {
+            LOG.warn("Unable to find text for key " + aTextName);
+        }
+        return result;
     }
 
     /**
             String message = findDefaultText(key, locale);
 
             if (message == null) {
-                LOG.warn("Unable to find text for key " + key);
-
                 message = defaultMessage;
             }