1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
7 <meta name=
"generator" content=
"Docutils 0.4: http://docutils.sourceforge.net/" />
8 <title>MochiKit.LoggingPane - Interactive MochiKit.Logging pane
</title>
10 <link rel=
"stylesheet" href=
"../../../include/css/documentation.css" type=
"text/css" />
11 <script type=
"text/javascript" src=
"../../../packed/MochiKit/MochiKit.js"></script>
12 <script type=
"text/javascript" src=
"../../js/toc.js"></script>
15 <div class=
"document">
17 <h1><a id=
"name" name=
"name">Name
</a></h1>
18 <p>MochiKit.LoggingPane - Interactive MochiKit.Logging pane
</p>
21 <h1><a id=
"synopsis" name=
"synopsis">Synopsis
</a></h1>
22 <pre class=
"literal-block">
23 // open a pop-up window
25 // use a div at the bottom of the document
26 createLoggingPane(true);
30 <h1><a id=
"description" name=
"description">Description
</a></h1>
31 <p>MochiKit.Logging does not have any browser dependencies and is
32 completely unobtrusive. MochiKit.LoggingPane is a browser-based
33 colored viewing pane for your
<a class=
"mochiref reference" href=
"Logging.html">MochiKit.Logging
</a> output that
34 can be used as a pop-up or inline.
</p>
35 <p>It also allows for regex and level filtering! MochiKit.LoggingPane is
37 <a class=
"mochiref reference" href=
"Logging.html#fn-debuggingbookmarklet">MochiKit.Logging.debuggingBookmarklet()
</a> if it is loaded.
</p>
40 <h1><a id=
"dependencies" name=
"dependencies">Dependencies
</a></h1>
42 <li><a class=
"mochiref reference" href=
"Base.html">MochiKit.Base
</a></li>
43 <li><a class=
"mochiref reference" href=
"Logging.html">MochiKit.Logging
</a></li>
47 <h1><a id=
"api-reference" name=
"api-reference">API Reference
</a></h1>
49 <h2><a id=
"constructors" name=
"constructors">Constructors
</a></h2>
51 <a name=
"fn-loggingpane"></a>
52 <a class=
"mochidef reference" href=
"#fn-loggingpane">LoggingPane(inline=false, logger=MochiKit.Logging.logger)
</a>:
</p>
54 <p>A listener for a
<a class=
"mochiref reference" href=
"Logging.html">MochiKit.Logging
</a> logger with an
55 interactive DOM representation.
</p>
56 <p>If
<tt class=
"docutils literal"><span class=
"pre">inline
</span></tt> is
<tt class=
"docutils literal"><span class=
"pre">true
</span></tt>, then the
<tt class=
"docutils literal"><span class=
"pre">LoggingPane
</span></tt> will be a
57 <tt class=
"docutils literal"><span class=
"pre">DIV
</span></tt> at the bottom of the document. Otherwise, it will be in a
58 pop-up window with a name based on the calling page's URL. If
59 there is an element in the document with an id of
60 <tt class=
"docutils literal"><span class=
"pre">_MochiKit_LoggingPane
</span></tt>, it will be used instead of appending a
61 new
<tt class=
"docutils literal"><span class=
"pre">DIV
</span></tt> to the body.
</p>
62 <p><tt class=
"docutils literal"><span class=
"pre">logger
</span></tt> is the reference to the
63 <a class=
"mochiref reference" href=
"Logging.html#fn-logger">MochiKit.Logging.Logger
</a> to listen to. If not
64 specified, the global default logger is used.
</p>
68 <dt><tt class=
"docutils literal"><span class=
"pre">win
</span></tt>:
</dt>
69 <dd>Reference to the pop-up window (
<tt class=
"docutils literal"><span class=
"pre">undefined
</span></tt> if
70 <tt class=
"docutils literal"><span class=
"pre">inline
</span></tt>)
</dd>
71 <dt><tt class=
"docutils literal"><span class=
"pre">inline
</span></tt>:
</dt>
72 <dd><tt class=
"docutils literal"><span class=
"pre">true
</span></tt> if the
<tt class=
"docutils literal"><span class=
"pre">LoggingPane
</span></tt> is inline
</dd>
73 <dt><tt class=
"docutils literal"><span class=
"pre">colorTable
</span></tt>:
</dt>
74 <dd><p class=
"first">An object with property-
>value mappings for each log level
75 and its color. May also be mutated on
76 <tt class=
"docutils literal"><span class=
"pre">LoggingPane.prototype
</span></tt> to affect all instances. For
78 <pre class=
"last literal-block">
79 MochiKit.LoggingPane.LoggingPane.prototype.colorTable = {
80 DEBUG:
"green
",
81 INFO:
"black
",
82 WARNING:
"blue
",
83 ERROR:
"red
",
84 FATAL:
"darkred
"
91 <dt><em>Availability
</em>:
</dt>
92 <dd>Available in MochiKit
1.3.1+
</dd>
96 <a name=
"fn-loggingpane.prototype.closepane"></a>
97 <a class=
"mochidef reference" href=
"#fn-loggingpane.prototype.closepane">LoggingPane.prototype.closePane()
</a>:
</p>
99 <p>Close the
<a class=
"mochiref reference" href=
"#fn-loggingpane">LoggingPane
</a> (close the child window, or
100 remove the
<tt class=
"docutils literal"><span class=
"pre">_MochiKit_LoggingPane
</span></tt> <tt class=
"docutils literal"><span class=
"pre">DIV
</span></tt> from the document).
</p>
101 <dl class=
"docutils">
102 <dt><em>Availability
</em>:
</dt>
103 <dd>Available in MochiKit
1.3.1+
</dd>
107 <div class=
"section">
108 <h2><a id=
"functions" name=
"functions">Functions
</a></h2>
110 <a name=
"fn-createloggingpane"></a>
111 <a class=
"mochidef reference" href=
"#fn-createloggingpane">createLoggingPane(inline=false)
</a>:
</p>
113 <p>Create or return an existing
<a class=
"mochiref reference" href=
"#fn-loggingpane">LoggingPane
</a> for this
114 document with the given inline setting. This is preferred over
115 using
<a class=
"mochiref reference" href=
"#fn-loggingpane">LoggingPane
</a> directly, as only one
116 <a class=
"mochiref reference" href=
"#fn-loggingpane">LoggingPane
</a> should be present in a given document.
</p>
117 <dl class=
"docutils">
118 <dt><em>Availability
</em>:
</dt>
119 <dd>Available in MochiKit
1.3.1+
</dd>
124 <div class=
"section">
125 <h1><a id=
"authors" name=
"authors">Authors
</a></h1>
127 <li>Bob Ippolito
<<a class=
"reference" href=
"mailto:bob@redivi.com">bob
@redivi.com
</a>></li>
130 <div class=
"section">
131 <h1><a id=
"copyright" name=
"copyright">Copyright
</a></h1>
132 <p>Copyright
2005 Bob Ippolito
<<a class=
"reference" href=
"mailto:bob@redivi.com">bob
@redivi.com
</a>>. This program is
133 dual-licensed free software; you can redistribute it and/or modify it
134 under the terms of the
<a class=
"reference" href=
"http://www.opensource.org/licenses/mit-license.php">MIT License
</a> or the
<a class=
"reference" href=
"http://www.opensource.org/licenses/afl-2.1.php">Academic Free License