PageRenderTime 44ms CodeModel.GetById 27ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/apache-log4j/site/apidocs/org/apache/log4j/BasicConfigurator.html

https://bitbucket.org/arkban/somersault
HTML | 319 lines | 260 code | 37 blank | 22 comment | 0 complexity | 872dffa84ca8322a166a9d895237b0e8 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, 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_16) -->
  6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7<TITLE>
  8BasicConfigurator (Apache Log4j 1.2.16 API)
  9</TITLE>
 10
 11<META NAME="date" CONTENT="2010-03-30">
 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="BasicConfigurator (Apache Log4j 1.2.16 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>&nbsp;</TD>
 42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BasicConfigurator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 48  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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&nbsp;<A HREF="../../../org/apache/log4j/AsyncAppender.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A>&nbsp;
 60&nbsp;<A HREF="../../../org/apache/log4j/Category.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD>
 61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 62  <A HREF="../../../index.html?org/apache/log4j/BasicConfigurator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 63&nbsp;<A HREF="BasicConfigurator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 64&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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</FONT>
 93<BR>
 94Class BasicConfigurator</H2>
 95<PRE>
 96<A HREF="http://java.sun.com/j2se/1.3/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 "><B>org.apache.log4j.BasicConfigurator</B>
 98</PRE>
 99<HR>
100<DL>
101<DT><PRE>public class <B>BasicConfigurator</B><DT>extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
102</PRE>
103
104<P>
105Use this class to quickly configure the package.
106
107   <p>For file based configuration see <A HREF="../../../org/apache/log4j/PropertyConfigurator.html" title="class in org.apache.log4j"><CODE>PropertyConfigurator</CODE></A>. For XML based configuration see <A HREF="../../../org/apache/log4j/xml/DOMConfigurator.html" title="class in org.apache.log4j.xml"><CODE>DOMConfigurator</CODE></A>.
108<P>
109
110<P>
111<DL>
112<DT><B>Since:</B></DT>
113  <DD>0.8.1</DD>
114<DT><B>Author:</B></DT>
115  <DD>Ceki G&uuml;lc&uuml;</DD>
116</DL>
117<HR>
118
119<P>
120
121<!-- ======== CONSTRUCTOR SUMMARY ======== -->
122
123<A NAME="constructor_summary"><!-- --></A>
124<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
127<B>Constructor Summary</B></FONT></TH>
128</TR>
129<TR BGCOLOR="white" CLASS="TableRowColor">
130<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131<CODE>protected </CODE></FONT></TD>
132<TD><CODE><B><A HREF="../../../org/apache/log4j/BasicConfigurator.html#BasicConfigurator()">BasicConfigurator</A></B>()</CODE>
133
134<BR>
135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
136</TR>
137</TABLE>
138&nbsp;
139<!-- ========== METHOD SUMMARY =========== -->
140
141<A NAME="method_summary"><!-- --></A>
142<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
143<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
144<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
145<B>Method Summary</B></FONT></TH>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149<CODE>static&nbsp;void</CODE></FONT></TD>
150<TD><CODE><B><A HREF="../../../org/apache/log4j/BasicConfigurator.html#configure()">configure</A></B>()</CODE>
151
152<BR>
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a <A HREF="../../../org/apache/log4j/ConsoleAppender.html" title="class in org.apache.log4j"><CODE>ConsoleAppender</CODE></A> that uses <A HREF="../../../org/apache/log4j/PatternLayout.html" title="class in org.apache.log4j"><CODE>PatternLayout</CODE></A>
154     using the <A HREF="../../../org/apache/log4j/PatternLayout.html#TTCC_CONVERSION_PATTERN"><CODE>PatternLayout.TTCC_CONVERSION_PATTERN</CODE></A> and
155     prints to <code>System.out</code> to the root category.</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>static&nbsp;void</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../org/apache/log4j/BasicConfigurator.html#configure(org.apache.log4j.Appender)">configure</A></B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A>&nbsp;appender)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add <code>appender</code> to the root category.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>static&nbsp;void</CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../org/apache/log4j/BasicConfigurator.html#resetConfiguration()">resetConfiguration</A></B>()</CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the default hierarchy to its defaut.</TD>
172</TR>
173</TABLE>
174&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
175<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
176<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
177<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
178</TR>
179<TR BGCOLOR="white" CLASS="TableRowColor">
180<TD><CODE><A HREF="http://java.sun.com/j2se/1.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
181</TR>
182</TABLE>
183&nbsp;
184<P>
185
186<!-- ========= CONSTRUCTOR DETAIL ======== -->
187
188<A NAME="constructor_detail"><!-- --></A>
189<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
190<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
191<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
192<B>Constructor Detail</B></FONT></TH>
193</TR>
194</TABLE>
195
196<A NAME="BasicConfigurator()"><!-- --></A><H3>
197BasicConfigurator</H3>
198<PRE>
199protected <B>BasicConfigurator</B>()</PRE>
200<DL>
201</DL>
202
203<!-- ============ METHOD DETAIL ========== -->
204
205<A NAME="method_detail"><!-- --></A>
206<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
207<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
208<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
209<B>Method Detail</B></FONT></TH>
210</TR>
211</TABLE>
212
213<A NAME="configure()"><!-- --></A><H3>
214configure</H3>
215<PRE>
216public static void <B>configure</B>()</PRE>
217<DL>
218<DD>Add a <A HREF="../../../org/apache/log4j/ConsoleAppender.html" title="class in org.apache.log4j"><CODE>ConsoleAppender</CODE></A> that uses <A HREF="../../../org/apache/log4j/PatternLayout.html" title="class in org.apache.log4j"><CODE>PatternLayout</CODE></A>
219     using the <A HREF="../../../org/apache/log4j/PatternLayout.html#TTCC_CONVERSION_PATTERN"><CODE>PatternLayout.TTCC_CONVERSION_PATTERN</CODE></A> and
220     prints to <code>System.out</code> to the root category.
221<P>
222<DD><DL>
223</DL>
224</DD>
225</DL>
226<HR>
227
228<A NAME="configure(org.apache.log4j.Appender)"><!-- --></A><H3>
229configure</H3>
230<PRE>
231public static void <B>configure</B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A>&nbsp;appender)</PRE>
232<DL>
233<DD>Add <code>appender</code> to the root category.
234<P>
235<DD><DL>
236<DT><B>Parameters:</B><DD><CODE>appender</CODE> - The appender to add to the root category.</DL>
237</DD>
238</DL>
239<HR>
240
241<A NAME="resetConfiguration()"><!-- --></A><H3>
242resetConfiguration</H3>
243<PRE>
244public static void <B>resetConfiguration</B>()</PRE>
245<DL>
246<DD>Reset the default hierarchy to its defaut. It is equivalent to
247     calling
248     <code>Category.getDefaultHierarchy().resetConfiguration()</code>.
249
250     See <A HREF="../../../org/apache/log4j/Hierarchy.html#resetConfiguration()"><CODE>Hierarchy.resetConfiguration()</CODE></A> for more details.
251<P>
252<DD><DL>
253</DL>
254</DD>
255</DL>
256<!-- ========= END OF CLASS DATA ========= -->
257<HR>
258
259
260<!-- ======= START OF BOTTOM NAVBAR ====== -->
261<A NAME="navbar_bottom"><!-- --></A>
262<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
263<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
264<TR>
265<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
266<A NAME="navbar_bottom_firstrow"><!-- --></A>
267<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
268  <TR ALIGN="center" VALIGN="top">
269  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
270  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
271  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
272  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BasicConfigurator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
273  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
274  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
275  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
276  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
277  </TR>
278</TABLE>
279</TD>
280<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
281</EM>
282</TD>
283</TR>
284
285<TR>
286<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
287&nbsp;<A HREF="../../../org/apache/log4j/AsyncAppender.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A>&nbsp;
288&nbsp;<A HREF="../../../org/apache/log4j/Category.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD>
289<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
290  <A HREF="../../../index.html?org/apache/log4j/BasicConfigurator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
291&nbsp;<A HREF="BasicConfigurator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
292&nbsp;<SCRIPT type="text/javascript">
293  <!--
294  if(window==top) {
295    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
296  }
297  //-->
298</SCRIPT>
299<NOSCRIPT>
300  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
301</NOSCRIPT>
302
303
304</FONT></TD>
305</TR>
306<TR>
307<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
308  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
309<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
310DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
311</TR>
312</TABLE>
313<A NAME="skip-navbar_bottom"></A>
314<!-- ======== END OF BOTTOM NAVBAR ======= -->
315
316<HR>
317Copyright &#169; 1999-2010 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
318</BODY>
319</HTML>