PageRenderTime 26ms CodeModel.GetById 1ms app.highlight 17ms RepoModel.GetById 0ms app.codeStats 1ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/util/Log.html

#
HTML | 597 lines | 517 code | 66 blank | 14 comment | 0 complexity | ff674ff0013f61937b2dec13e7ac63b3 MD5 | raw file
  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.5.0_14) on Tue Jul 22 07:14:16 GMT-08:00 2008 -->
  6<TITLE>
  7Log (jEdit API)
  8</TITLE>
  9
 10<META NAME="keywords" CONTENT="org.gjt.sp.util.Log class">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 13
 14
 15<NOSCRIPT>
 16</NOSCRIPT>
 17
 18</HEAD>
 19
 20<BODY BGCOLOR="white" >
 21
 22
 23<!-- ========= START OF TOP NAVBAR ======= -->
 24<A NAME="navbar_top"><!-- --></A>
 25<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 26<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 27<TR>
 28<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 29<A NAME="navbar_top_firstrow"><!-- --></A>
 30<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 31  <TR ALIGN="center" VALIGN="top">
 32  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 33  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 34  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 35  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Log.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 36  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 39  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 40  </TR>
 41</TABLE>
 42</TD>
 43<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 44</EM>
 45</TD>
 46</TR>
 47
 48<TR>
 49<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 50&nbsp;<A HREF="../../../../org/gjt/sp/util/IOUtilities.html" title="class in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
 51&nbsp;<A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
 52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 53  <A HREF="../../../../index.html?org/gjt/sp/util/Log.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 54&nbsp;<A HREF="Log.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 55&nbsp;
 56<NOSCRIPT>
 57  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 58</NOSCRIPT>
 59
 60
 61</FONT></TD>
 62</TR>
 63<TR>
 64<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 65  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 66<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 67DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 68</TR>
 69</TABLE>
 70<A NAME="skip-navbar_top"></A>
 71<!-- ========= END OF TOP NAVBAR ========= -->
 72
 73<HR>
 74<!-- ======== START OF CLASS DATA ======== -->
 75<H2>
 76<FONT SIZE="-1">
 77org.gjt.sp.util</FONT>
 78<BR>
 79Class Log</H2>
 80<PRE>
 81java.lang.Object
 82  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.util.Log</B>
 83</PRE>
 84<HR>
 85<DL>
 86<DT><PRE>public class <B>Log</B><DT>extends java.lang.Object</DL>
 87</PRE>
 88
 89<P>
 90This class provides methods for logging events. In terms of functionality,
 91 it is somewhere in between <code>System.out.println()</code> and
 92 full-blown logging packages such as log4j.<p>
 93
 94 All events are logged to an in-memory buffer and optionally a stream,
 95 and those with a high urgency (warnings and errors) are also printed
 96 to standard output.<p>
 97
 98 Logging of exception tracebacks is supported.<p>
 99
100 This class can also optionally redirect standard output and error to the log.
101<P>
102
103<P>
104<HR>
105
106<P>
107<!-- =========== FIELD SUMMARY =========== -->
108
109<A NAME="field_summary"><!-- --></A>
110<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
111<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
112<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
113<B>Field Summary</B></FONT></TH>
114</TR>
115<TR BGCOLOR="white" CLASS="TableRowColor">
116<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
117<CODE>static&nbsp;int</CODE></FONT></TD>
118<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#DEBUG">DEBUG</A></B></CODE>
119
120<BR>
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Debugging message urgency.</TD>
122</TR>
123<TR BGCOLOR="white" CLASS="TableRowColor">
124<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
125<CODE>static&nbsp;int</CODE></FONT></TD>
126<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#ERROR">ERROR</A></B></CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Error urgency.</TD>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133<CODE>static&nbsp;int</CODE></FONT></TD>
134<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#MAXLINES">MAXLINES</A></B></CODE>
135
136<BR>
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of log messages that will be kept in memory.</TD>
138</TR>
139<TR BGCOLOR="white" CLASS="TableRowColor">
140<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
141<CODE>static&nbsp;int</CODE></FONT></TD>
142<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#MESSAGE">MESSAGE</A></B></CODE>
143
144<BR>
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message urgency.</TD>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149<CODE>static&nbsp;int</CODE></FONT></TD>
150<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#NOTICE">NOTICE</A></B></CODE>
151
152<BR>
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notice urgency.</TD>
154</TR>
155<TR BGCOLOR="white" CLASS="TableRowColor">
156<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157<CODE>static&nbsp;java.util.List&lt;java.lang.Throwable&gt;</CODE></FONT></TD>
158<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#throwables">throwables</A></B></CODE>
159
160<BR>
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
162</TR>
163<TR BGCOLOR="white" CLASS="TableRowColor">
164<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165<CODE>static&nbsp;int</CODE></FONT></TD>
166<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#WARNING">WARNING</A></B></CODE>
167
168<BR>
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Warning urgency.</TD>
170</TR>
171</TABLE>
172&nbsp;
173<!-- ======== CONSTRUCTOR SUMMARY ======== -->
174
175<A NAME="constructor_summary"><!-- --></A>
176<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
177<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
178<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
179<B>Constructor Summary</B></FONT></TH>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#Log()">Log</A></B>()</CODE>
183
184<BR>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
186</TR>
187</TABLE>
188&nbsp;
189<!-- ========== METHOD SUMMARY =========== -->
190
191<A NAME="method_summary"><!-- --></A>
192<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
193<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
194<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
195<B>Method Summary</B></FONT></TH>
196</TR>
197<TR BGCOLOR="white" CLASS="TableRowColor">
198<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
199<CODE>static&nbsp;void</CODE></FONT></TD>
200<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#closeStream()">closeStream</A></B>()</CODE>
201
202<BR>
203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the log stream.</TD>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
207<CODE>static&nbsp;void</CODE></FONT></TD>
208<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#flushStream()">flushStream</A></B>()</CODE>
209
210<BR>
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes the log stream.</TD>
212</TR>
213<TR BGCOLOR="white" CLASS="TableRowColor">
214<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
215<CODE>static&nbsp;javax.swing.ListModel</CODE></FONT></TD>
216<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#getLogListModel()">getLogListModel</A></B>()</CODE>
217
218<BR>
219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the list model for viewing the log contents.</TD>
220</TR>
221<TR BGCOLOR="white" CLASS="TableRowColor">
222<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223<CODE>static&nbsp;void</CODE></FONT></TD>
224<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#init(boolean, int)">init</A></B>(boolean&nbsp;stdio,
225     int&nbsp;level)</CODE>
226
227<BR>
228&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the log.</TD>
229</TR>
230<TR BGCOLOR="white" CLASS="TableRowColor">
231<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232<CODE>static&nbsp;void</CODE></FONT></TD>
233<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#log(int, java.lang.Object, java.lang.Object)">log</A></B>(int&nbsp;urgency,
234    java.lang.Object&nbsp;source,
235    java.lang.Object&nbsp;message)</CODE>
236
237<BR>
238&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logs a message.</TD>
239</TR>
240<TR BGCOLOR="white" CLASS="TableRowColor">
241<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242<CODE>static&nbsp;void</CODE></FONT></TD>
243<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#log(int, java.lang.Object, java.lang.Object, java.lang.Throwable)">log</A></B>(int&nbsp;urgency,
244    java.lang.Object&nbsp;source,
245    java.lang.Object&nbsp;message,
246    java.lang.Throwable&nbsp;exception)</CODE>
247
248<BR>
249&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logs an exception with a message.</TD>
250</TR>
251<TR BGCOLOR="white" CLASS="TableRowColor">
252<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253<CODE>static&nbsp;void</CODE></FONT></TD>
254<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/Log.html#setLogWriter(java.io.Writer)">setLogWriter</A></B>(java.io.Writer&nbsp;stream)</CODE>
255
256<BR>
257&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes all currently logged messages to this stream if there was no
258 stream set previously, and sets the stream to write future log
259 messages to.</TD>
260</TR>
261</TABLE>
262&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
263<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
264<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
265<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
266</TR>
267<TR BGCOLOR="white" CLASS="TableRowColor">
268<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
269</TR>
270</TABLE>
271&nbsp;
272<P>
273
274<!-- ============ FIELD DETAIL =========== -->
275
276<A NAME="field_detail"><!-- --></A>
277<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
278<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
279<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
280<B>Field Detail</B></FONT></TH>
281</TR>
282</TABLE>
283
284<A NAME="MAXLINES"><!-- --></A><H3>
285MAXLINES</H3>
286<PRE>
287public static final int <B>MAXLINES</B></PRE>
288<DL>
289<DD>The maximum number of log messages that will be kept in memory.
290<P>
291<DL>
292<DT><B>Since:</B></DT>
293  <DD>jEdit 2.6pre5</DD>
294<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.MAXLINES">Constant Field Values</A></DL>
295</DL>
296<HR>
297
298<A NAME="DEBUG"><!-- --></A><H3>
299DEBUG</H3>
300<PRE>
301public static final int <B>DEBUG</B></PRE>
302<DL>
303<DD>Debugging message urgency. Should be used for messages only
304 useful when debugging a problem.
305<P>
306<DL>
307<DT><B>Since:</B></DT>
308  <DD>jEdit 2.2pre2</DD>
309<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.DEBUG">Constant Field Values</A></DL>
310</DL>
311<HR>
312
313<A NAME="MESSAGE"><!-- --></A><H3>
314MESSAGE</H3>
315<PRE>
316public static final int <B>MESSAGE</B></PRE>
317<DL>
318<DD>Message urgency. Should be used for messages which give more
319 detail than notices.
320<P>
321<DL>
322<DT><B>Since:</B></DT>
323  <DD>jEdit 2.2pre2</DD>
324<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.MESSAGE">Constant Field Values</A></DL>
325</DL>
326<HR>
327
328<A NAME="NOTICE"><!-- --></A><H3>
329NOTICE</H3>
330<PRE>
331public static final int <B>NOTICE</B></PRE>
332<DL>
333<DD>Notice urgency. Should be used for messages that directly
334 affect the user.
335<P>
336<DL>
337<DT><B>Since:</B></DT>
338  <DD>jEdit 2.2pre2</DD>
339<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.NOTICE">Constant Field Values</A></DL>
340</DL>
341<HR>
342
343<A NAME="WARNING"><!-- --></A><H3>
344WARNING</H3>
345<PRE>
346public static final int <B>WARNING</B></PRE>
347<DL>
348<DD>Warning urgency. Should be used for messages that warrant
349 attention.
350<P>
351<DL>
352<DT><B>Since:</B></DT>
353  <DD>jEdit 2.2pre2</DD>
354<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.WARNING">Constant Field Values</A></DL>
355</DL>
356<HR>
357
358<A NAME="ERROR"><!-- --></A><H3>
359ERROR</H3>
360<PRE>
361public static final int <B>ERROR</B></PRE>
362<DL>
363<DD>Error urgency. Should be used for messages that signal a
364 failure.
365<P>
366<DL>
367<DT><B>Since:</B></DT>
368  <DD>jEdit 2.2pre2</DD>
369<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.gjt.sp.util.Log.ERROR">Constant Field Values</A></DL>
370</DL>
371<HR>
372
373<A NAME="throwables"><!-- --></A><H3>
374throwables</H3>
375<PRE>
376public static final java.util.List&lt;java.lang.Throwable&gt; <B>throwables</B></PRE>
377<DL>
378<DL>
379</DL>
380</DL>
381
382<!-- ========= CONSTRUCTOR DETAIL ======== -->
383
384<A NAME="constructor_detail"><!-- --></A>
385<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
386<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
387<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
388<B>Constructor Detail</B></FONT></TH>
389</TR>
390</TABLE>
391
392<A NAME="Log()"><!-- --></A><H3>
393Log</H3>
394<PRE>
395public <B>Log</B>()</PRE>
396<DL>
397</DL>
398
399<!-- ============ METHOD DETAIL ========== -->
400
401<A NAME="method_detail"><!-- --></A>
402<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
403<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
404<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
405<B>Method Detail</B></FONT></TH>
406</TR>
407</TABLE>
408
409<A NAME="init(boolean, int)"><!-- --></A><H3>
410init</H3>
411<PRE>
412public static void <B>init</B>(boolean&nbsp;stdio,
413                        int&nbsp;level)</PRE>
414<DL>
415<DD>Initializes the log.
416<P>
417<DD><DL>
418<DT><B>Parameters:</B><DD><CODE>stdio</CODE> - If true, standard output and error will be
419 sent to the log<DD><CODE>level</CODE> - Messages with this log level or higher will
420 be printed to the system console<DT><B>Since:</B></DT>
421  <DD>jEdit 3.2pre4</DD>
422</DL>
423</DD>
424</DL>
425<HR>
426
427<A NAME="setLogWriter(java.io.Writer)"><!-- --></A><H3>
428setLogWriter</H3>
429<PRE>
430public static void <B>setLogWriter</B>(java.io.Writer&nbsp;stream)</PRE>
431<DL>
432<DD>Writes all currently logged messages to this stream if there was no
433 stream set previously, and sets the stream to write future log
434 messages to.
435<P>
436<DD><DL>
437<DT><B>Parameters:</B><DD><CODE>stream</CODE> - The writer<DT><B>Since:</B></DT>
438  <DD>jEdit 3.2pre4</DD>
439</DL>
440</DD>
441</DL>
442<HR>
443
444<A NAME="flushStream()"><!-- --></A><H3>
445flushStream</H3>
446<PRE>
447public static void <B>flushStream</B>()</PRE>
448<DL>
449<DD>Flushes the log stream.
450<P>
451<DD><DL>
452<DT><B>Since:</B></DT>
453  <DD>jEdit 2.6pre5</DD>
454</DL>
455</DD>
456</DL>
457<HR>
458
459<A NAME="closeStream()"><!-- --></A><H3>
460closeStream</H3>
461<PRE>
462public static void <B>closeStream</B>()</PRE>
463<DL>
464<DD>Closes the log stream. Should be done before your program exits.
465<P>
466<DD><DL>
467<DT><B>Since:</B></DT>
468  <DD>jEdit 2.6pre5</DD>
469</DL>
470</DD>
471</DL>
472<HR>
473
474<A NAME="getLogListModel()"><!-- --></A><H3>
475getLogListModel</H3>
476<PRE>
477public static javax.swing.ListModel <B>getLogListModel</B>()</PRE>
478<DL>
479<DD>Returns the list model for viewing the log contents.
480<P>
481<DD><DL>
482<DT><B>Since:</B></DT>
483  <DD>jEdit 4.2pre1</DD>
484</DL>
485</DD>
486</DL>
487<HR>
488
489<A NAME="log(int, java.lang.Object, java.lang.Object, java.lang.Throwable)"><!-- --></A><H3>
490log</H3>
491<PRE>
492public static void <B>log</B>(int&nbsp;urgency,
493                       java.lang.Object&nbsp;source,
494                       java.lang.Object&nbsp;message,
495                       java.lang.Throwable&nbsp;exception)</PRE>
496<DL>
497<DD>Logs an exception with a message.
498
499 If an exception is the cause of a call to <A HREF="../../../../org/gjt/sp/util/Log.html#log"><CODE>log</CODE></A>, then
500 the exception should be explicitly provided so that it can
501 be presented to the (debugging) user in a useful manner
502 (not just the exception message, but also the exception stack trace)
503<P>
504<DD><DL>
505<DT><B>Since:</B></DT>
506  <DD>jEdit 4.3pre5</DD>
507</DL>
508</DD>
509</DL>
510<HR>
511
512<A NAME="log(int, java.lang.Object, java.lang.Object)"><!-- --></A><H3>
513log</H3>
514<PRE>
515public static void <B>log</B>(int&nbsp;urgency,
516                       java.lang.Object&nbsp;source,
517                       java.lang.Object&nbsp;message)</PRE>
518<DL>
519<DD>Logs a message. This method is thread-safe.<p>
520
521 The following code sends a typical debugging message to the activity
522 log:
523 <pre>Log.log(Log.DEBUG,this,"counter = " + counter);</pre>
524 The corresponding activity log entry might read as follows:
525 <pre>[debug] JavaParser: counter = 15</pre>
526<P>
527<DD><DL>
528<DT><B>Parameters:</B><DD><CODE>urgency</CODE> - The urgency; can be one of
529 <code>Log.DEBUG</code>, <code>Log.MESSAGE</code>,
530 <code>Log.NOTICE</code>, <code>Log.WARNING</code>, or
531 <code>Log.ERROR</code>.<DD><CODE>source</CODE> - The source of the message, either an object or a
532 class instance. When writing log messages from macros, set
533 this parameter to <code>BeanShell.class</code> to make macro
534 errors easier to spot in the activity log.<DD><CODE>message</CODE> - The message. This can either be a string or
535 an exception<DT><B>Since:</B></DT>
536  <DD>jEdit 2.2pre2</DD>
537</DL>
538</DD>
539</DL>
540<!-- ========= END OF CLASS DATA ========= -->
541<HR>
542
543
544<!-- ======= START OF BOTTOM NAVBAR ====== -->
545<A NAME="navbar_bottom"><!-- --></A>
546<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
547<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
548<TR>
549<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
550<A NAME="navbar_bottom_firstrow"><!-- --></A>
551<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
552  <TR ALIGN="center" VALIGN="top">
553  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
554  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
555  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
556  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Log.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
557  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
558  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
559  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
560  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
561  </TR>
562</TABLE>
563</TD>
564<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
565</EM>
566</TD>
567</TR>
568
569<TR>
570<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
571&nbsp;<A HREF="../../../../org/gjt/sp/util/IOUtilities.html" title="class in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
572&nbsp;<A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
573<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
574  <A HREF="../../../../index.html?org/gjt/sp/util/Log.html" target="_top"><B>FRAMES</B></A>  &nbsp;
575&nbsp;<A HREF="Log.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
576&nbsp;
577<NOSCRIPT>
578  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
579</NOSCRIPT>
580
581
582</FONT></TD>
583</TR>
584<TR>
585<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
586  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
587<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
588DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
589</TR>
590</TABLE>
591<A NAME="skip-navbar_bottom"></A>
592<!-- ======== END OF BOTTOM NAVBAR ======= -->
593
594<HR>
595
596</BODY>
597</HTML>