PageRenderTime 31ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

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