/apache-log4j-1.2.17/site/apidocs/org/apache/log4j/pattern/LevelPatternConverter.html
HTML | 306 lines | 255 code | 31 blank | 20 comment | 0 complexity | 9cca8d33736f0f9c75e8530b470f582b MD5 | raw file
Possible License(s): Apache-2.0
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_23) -->
6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<TITLE>
8LevelPatternConverter (Apache Log4j 1.2.17 API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-05-06">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18 if (location.href.indexOf('is-external=true') == -1) {
19 parent.document.title="LevelPatternConverter (Apache Log4j 1.2.17 API)";
20 }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40 <TR ALIGN="center" VALIGN="top">
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LevelPatternConverter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
48 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
49 </TR>
50</TABLE>
51</TD>
52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53</EM>
54</TD>
55</TR>
56
57<TR>
58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59 <A HREF="../../../../org/apache/log4j/pattern/IntegerPatternConverter.html" title="class in org.apache.log4j.pattern"><B>PREV CLASS</B></A>
60 <A HREF="../../../../org/apache/log4j/pattern/LineLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>NEXT CLASS</B></A></FONT></TD>
61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62 <A HREF="../../../../index.html?org/apache/log4j/pattern/LevelPatternConverter.html" target="_top"><B>FRAMES</B></A>
63 <A HREF="LevelPatternConverter.html" target="_top"><B>NO FRAMES</B></A>
64 <SCRIPT type="text/javascript">
65 <!--
66 if(window==top) {
67 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
68 }
69 //-->
70</SCRIPT>
71<NOSCRIPT>
72 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
73</NOSCRIPT>
74
75
76</FONT></TD>
77</TR>
78<TR>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
83</TR>
84</TABLE>
85<A NAME="skip-navbar_top"></A>
86<!-- ========= END OF TOP NAVBAR ========= -->
87
88<HR>
89<!-- ======== START OF CLASS DATA ======== -->
90<H2>
91<FONT SIZE="-1">
92org.apache.log4j.pattern</FONT>
93<BR>
94Class LevelPatternConverter</H2>
95<PRE>
96<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
97 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/log4j/pattern/PatternConverter.html" title="class in org.apache.log4j.pattern">org.apache.log4j.pattern.PatternConverter</A>
98 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html" title="class in org.apache.log4j.pattern">org.apache.log4j.pattern.LoggingEventPatternConverter</A>
99 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.log4j.pattern.LevelPatternConverter</B>
100</PRE>
101<HR>
102<DL>
103<DT><PRE>public final class <B>LevelPatternConverter</B><DT>extends <A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html" title="class in org.apache.log4j.pattern">LoggingEventPatternConverter</A></DL>
104</PRE>
105
106<P>
107Return the event's level in a StringBuffer.
108<P>
109
110<P>
111<DL>
112<DT><B>Author:</B></DT>
113 <DD>Ceki Gülcü</DD>
114</DL>
115<HR>
116
117<P>
118
119<!-- ========== METHOD SUMMARY =========== -->
120
121<A NAME="method_summary"><!-- --></A>
122<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
123<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
124<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
125<B>Method Summary</B></FONT></TH>
126</TR>
127<TR BGCOLOR="white" CLASS="TableRowColor">
128<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
129<CODE> void</CODE></FONT></TD>
130<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/LevelPatternConverter.html#format(org.apache.log4j.spi.LoggingEvent, java.lang.StringBuffer)">format</A></B>(<A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A> event,
131 <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</A> output)</CODE>
132
133<BR>
134 Formats an event into a string buffer.</TD>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
139<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/LevelPatternConverter.html#getStyleClass(java.lang.Object)">getStyleClass</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> e)</CODE>
140
141<BR>
142 This method returns the CSS style class that should be applied to
143 the LoggingEvent passed as parameter, which can be null.</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>static <A HREF="../../../../org/apache/log4j/pattern/LevelPatternConverter.html" title="class in org.apache.log4j.pattern">LevelPatternConverter</A></CODE></FONT></TD>
148<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/LevelPatternConverter.html#newInstance(java.lang.String[])">newInstance</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] options)</CODE>
149
150<BR>
151 Obtains an instance of pattern converter.</TD>
152</TR>
153</TABLE>
154 <A NAME="methods_inherited_from_class_org.apache.log4j.pattern.LoggingEventPatternConverter"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
157<TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.pattern.<A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html" title="class in org.apache.log4j.pattern">LoggingEventPatternConverter</A></B></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD><CODE><A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html#format(java.lang.Object, java.lang.StringBuffer)">format</A>, <A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html#handlesThrowable()">handlesThrowable</A></CODE></TD>
161</TR>
162</TABLE>
163 <A NAME="methods_inherited_from_class_org.apache.log4j.pattern.PatternConverter"><!-- --></A>
164<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
166<TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.pattern.<A HREF="../../../../org/apache/log4j/pattern/PatternConverter.html" title="class in org.apache.log4j.pattern">PatternConverter</A></B></TH>
167</TR>
168<TR BGCOLOR="white" CLASS="TableRowColor">
169<TD><CODE><A HREF="../../../../org/apache/log4j/pattern/PatternConverter.html#getName()">getName</A></CODE></TD>
170</TR>
171</TABLE>
172 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
173<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
174<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
175<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
179</TR>
180</TABLE>
181
182<P>
183
184<!-- ============ METHOD DETAIL ========== -->
185
186<A NAME="method_detail"><!-- --></A>
187<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
189<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
190<B>Method Detail</B></FONT></TH>
191</TR>
192</TABLE>
193
194<A NAME="newInstance(java.lang.String[])"><!-- --></A><H3>
195newInstance</H3>
196<PRE>
197public static <A HREF="../../../../org/apache/log4j/pattern/LevelPatternConverter.html" title="class in org.apache.log4j.pattern">LevelPatternConverter</A> <B>newInstance</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] options)</PRE>
198<DL>
199<DD>Obtains an instance of pattern converter.
200<P>
201<DD><DL>
202<DT><B>Parameters:</B><DD><CODE>options</CODE> - options, may be null.
203<DT><B>Returns:</B><DD>instance of pattern converter.</DL>
204</DD>
205</DL>
206<HR>
207
208<A NAME="format(org.apache.log4j.spi.LoggingEvent, java.lang.StringBuffer)"><!-- --></A><H3>
209format</H3>
210<PRE>
211public void <B>format</B>(<A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A> event,
212 <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</A> output)</PRE>
213<DL>
214<DD>Formats an event into a string buffer.
215<P>
216<DD><DL>
217<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html#format(org.apache.log4j.spi.LoggingEvent, java.lang.StringBuffer)">format</A></CODE> in class <CODE><A HREF="../../../../org/apache/log4j/pattern/LoggingEventPatternConverter.html" title="class in org.apache.log4j.pattern">LoggingEventPatternConverter</A></CODE></DL>
218</DD>
219<DD><DL>
220<DT><B>Parameters:</B><DD><CODE>event</CODE> - event to format, may not be null.<DD><CODE>output</CODE> - string buffer to which the formatted event will be appended. May not be null.</DL>
221</DD>
222</DL>
223<HR>
224
225<A NAME="getStyleClass(java.lang.Object)"><!-- --></A><H3>
226getStyleClass</H3>
227<PRE>
228public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getStyleClass</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> e)</PRE>
229<DL>
230<DD>This method returns the CSS style class that should be applied to
231 the LoggingEvent passed as parameter, which can be null.
232
233 This information is currently used only by HTMLLayout.
234<P>
235<DD><DL>
236<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/log4j/pattern/PatternConverter.html#getStyleClass(java.lang.Object)">getStyleClass</A></CODE> in class <CODE><A HREF="../../../../org/apache/log4j/pattern/PatternConverter.html" title="class in org.apache.log4j.pattern">PatternConverter</A></CODE></DL>
237</DD>
238<DD><DL>
239<DT><B>Parameters:</B><DD><CODE>e</CODE> - null values are accepted
240<DT><B>Returns:</B><DD>the name of the conversion pattern</DL>
241</DD>
242</DL>
243<!-- ========= END OF CLASS DATA ========= -->
244<HR>
245
246
247<!-- ======= START OF BOTTOM NAVBAR ====== -->
248<A NAME="navbar_bottom"><!-- --></A>
249<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
250<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
251<TR>
252<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
253<A NAME="navbar_bottom_firstrow"><!-- --></A>
254<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
255 <TR ALIGN="center" VALIGN="top">
256 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
257 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
258 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
259 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LevelPatternConverter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
260 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
261 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
262 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
263 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
264 </TR>
265</TABLE>
266</TD>
267<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
268</EM>
269</TD>
270</TR>
271
272<TR>
273<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
274 <A HREF="../../../../org/apache/log4j/pattern/IntegerPatternConverter.html" title="class in org.apache.log4j.pattern"><B>PREV CLASS</B></A>
275 <A HREF="../../../../org/apache/log4j/pattern/LineLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>NEXT CLASS</B></A></FONT></TD>
276<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
277 <A HREF="../../../../index.html?org/apache/log4j/pattern/LevelPatternConverter.html" target="_top"><B>FRAMES</B></A>
278 <A HREF="LevelPatternConverter.html" target="_top"><B>NO FRAMES</B></A>
279 <SCRIPT type="text/javascript">
280 <!--
281 if(window==top) {
282 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
283 }
284 //-->
285</SCRIPT>
286<NOSCRIPT>
287 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
288</NOSCRIPT>
289
290
291</FONT></TD>
292</TR>
293<TR>
294<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
295 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
296<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
297DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
298</TR>
299</TABLE>
300<A NAME="skip-navbar_bottom"></A>
301<!-- ======== END OF BOTTOM NAVBAR ======= -->
302
303<HR>
304Copyright © 1999-2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
305</BODY>
306</HTML>