1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.tags.log;
17
18 import org.apache.commons.jelly.JellyTagException;
19 import org.apache.commons.jelly.XMLOutput;
20 import org.apache.commons.logging.Log;
21
22 /***
23 * A tag which generates WARN level logging statement using
24 * the given category name.
25 *
26 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
27 * @version $Revision: 155420 $
28 */
29 public class WarnTag extends LogTagSupport {
30
31 public WarnTag() {
32 }
33
34
35
36 public void doTag(XMLOutput output) throws JellyTagException {
37 Log log = getLog();
38 if ( log.isWarnEnabled() ) {
39 log.warn( getBodyText(isEncode()) );
40 }
41 }
42 }