ASF Bugzilla – Attachment 4112 Details for
Bug 15231
Miscellaneous patches to i18n
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
simplify debug logging calls
MessageTag_logging.diff (text/plain), 1.86 KB, created by
Jon Evans
on 2002-12-10 14:43:39 UTC
(
hide
)
Description:
simplify debug logging calls
Filename:
MIME Type:
Creator:
Jon Evans
Created:
2002-12-10 14:43:39 UTC
Size:
1.86 KB
patch
obsolete
>--- MessageTag.java Tue Dec 10 14:38:26 2002 >+++ MessageTag2.java Tue Dec 10 14:36:29 2002 >@@ -188,11 +188,7 @@ > public void addArg(Object arg) > { > _arguments.add(arg); >- if (_debug) >- { >- ServletContext sc = pageContext.getServletContext(); >- sc.log("i18n:message added arg: " + arg.toString()); >- } >+ log("added arg: " + arg.toString()); > } > > /** >@@ -242,16 +238,11 @@ > try > { > _value = bundle.getString(key); >- if (_debug) >- { >- ServletContext sc = pageContext.getServletContext(); >- sc.log("i18n: message: template for " + key + " is: " + _value); >- } >+ log("template for " + key + " is: " + _value); > } > catch (java.util.MissingResourceException e) > { >- ServletContext sc = pageContext.getServletContext(); >- sc.log("value not found for key:" + key); >+ log("value not found for key:" + key); > } > > return BodyTag.EVAL_BODY_TAG; >@@ -284,12 +275,7 @@ > > if ( _value == null) > { >- if (_debug) >- { >- ServletContext sc = pageContext.getServletContext(); >- String key = this.getKey(); >- sc.log("i18n: message: skipping null value for " + key); >- } >+ log("skipping null value for " + _key); > } > else if (id != null) > { >@@ -310,6 +296,20 @@ > // only process the body once > return BodyTag.EVAL_PAGE; > } >- >+ >+ /** >+ * log a message to the servlet context log if we are in >+ * debug mode (otherwise, do nothing). >+ * @param message the message to log >+ */ >+ private void log(String message) >+ { >+ if (_debug) >+ { >+ ServletContext sc = pageContext.getServletContext(); >+ sc.log("i18n:message: " + message); >+ } >+ } >+ > > } // MessageTag
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15231
:
4110
| 4112 |
4114