log4r 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -3
- data/Rakefile +2 -2
- data/doc/rdoc/Log4r.html +519 -0
- data/doc/rdoc/Log4r/BasicFormatter.html +388 -0
- data/doc/rdoc/Log4r/ConfigError.html +225 -0
- data/doc/rdoc/Log4r/Configurator.html +1068 -0
- data/doc/rdoc/Log4r/DateFileOutputter.html +479 -0
- data/doc/rdoc/Log4r/DefaultFormatter.html +223 -0
- data/doc/rdoc/Log4r/EmailOutputter.html +654 -0
- data/doc/rdoc/Log4r/FileOutputter.html +346 -0
- data/doc/rdoc/Log4r/Formatter.html +309 -0
- data/doc/rdoc/Log4r/GDC.html +346 -0
- data/doc/rdoc/Log4r/GDC_rb.html +80 -0
- data/doc/rdoc/Log4r/IOOutputter.html +410 -0
- data/doc/rdoc/Log4r/Log4jXmlFormatter.html +337 -0
- data/doc/rdoc/Log4r/Log4rConfig.html +211 -0
- data/doc/rdoc/Log4r/Log4rTools.html +388 -0
- data/doc/rdoc/Log4r/LogEvent.html +378 -0
- data/doc/rdoc/Log4r/LogServer.html +340 -0
- data/doc/rdoc/Log4r/Logger.html +1150 -0
- data/doc/rdoc/Log4r/Logger/LoggerFactory.html +218 -0
- data/doc/rdoc/Log4r/Logger/Repository.html +225 -0
- data/doc/rdoc/Log4r/MDC.html +424 -0
- data/doc/rdoc/Log4r/MDC_rb.html +83 -0
- data/doc/rdoc/Log4r/NDC.html +632 -0
- data/doc/rdoc/Log4r/NDC_rb.html +110 -0
- data/doc/rdoc/Log4r/ObjectFormatter.html +280 -0
- data/doc/rdoc/Log4r/Outputter.html +934 -0
- data/doc/rdoc/Log4r/Outputter/OutputterFactory.html +218 -0
- data/doc/rdoc/Log4r/Outputter/consoleoutputters_rb.html +57 -0
- data/doc/rdoc/Log4r/Outputter/datefileoutputter_rb.html +93 -0
- data/doc/rdoc/Log4r/Outputter/emailoutputter_rb.html +179 -0
- data/doc/rdoc/Log4r/Outputter/fileoutputter_rb.html +64 -0
- data/doc/rdoc/Log4r/Outputter/iooutputter_rb.html +59 -0
- data/doc/rdoc/Log4r/Outputter/outputter_rb.html +222 -0
- data/doc/rdoc/Log4r/Outputter/outputterfactory_rb.html +62 -0
- data/doc/rdoc/Log4r/Outputter/remoteoutputter_rb.html +59 -0
- data/doc/rdoc/Log4r/Outputter/rollingfileoutputter_rb.html +66 -0
- data/doc/rdoc/Log4r/Outputter/staticoutputter_rb.html +55 -0
- data/doc/rdoc/Log4r/Outputter/syslogoutputter_rb.html +110 -0
- data/doc/rdoc/Log4r/Outputter/udpoutputter_rb.html +220 -0
- data/doc/rdoc/Log4r/PatternFormatter.html +404 -0
- data/doc/rdoc/Log4r/ROMPClient.html +211 -0
- data/doc/rdoc/Log4r/ROMPServer.html +211 -0
- data/doc/rdoc/Log4r/RemoteOutputter.html +402 -0
- data/doc/rdoc/Log4r/RollingFileOutputter.html +551 -0
- data/doc/rdoc/Log4r/RootLogger.html +530 -0
- data/doc/rdoc/Log4r/SimpleFormatter.html +276 -0
- data/doc/rdoc/Log4r/StderrOutputter.html +268 -0
- data/doc/rdoc/Log4r/StdoutOutputter.html +268 -0
- data/doc/rdoc/Log4r/SyslogOutputter.html +551 -0
- data/doc/rdoc/Log4r/UDPOutputter.html +379 -0
- data/doc/rdoc/Log4r/YamlConfigurator.html +966 -0
- data/doc/rdoc/Log4r/base_rb.html +57 -0
- data/doc/rdoc/Log4r/config_rb.html +122 -0
- data/doc/rdoc/Log4r/configurator_rb.html +370 -0
- data/doc/rdoc/Log4r/formatter/formatter_rb.html +121 -0
- data/doc/rdoc/Log4r/formatter/log4jxmlformatter_rb.html +64 -0
- data/doc/rdoc/Log4r/formatter/patternformatter_rb.html +239 -0
- data/doc/rdoc/Log4r/lib/drbloader_rb.html +57 -0
- data/doc/rdoc/Log4r/lib/xmlloader_rb.html +57 -0
- data/doc/rdoc/Log4r/logevent_rb.html +55 -0
- data/doc/rdoc/Log4r/logger_rb.html +293 -0
- data/doc/rdoc/Log4r/loggerfactory_rb.html +66 -0
- data/doc/rdoc/Log4r/logserver_rb.html +161 -0
- data/doc/rdoc/Log4r/rdoc/GDC.html +175 -0
- data/doc/rdoc/Log4r/rdoc/MDC.html +178 -0
- data/doc/rdoc/Log4r/rdoc/NDC.html +207 -0
- data/doc/rdoc/Log4r/rdoc/configurator.html +462 -0
- data/doc/rdoc/Log4r/rdoc/emailoutputter.html +279 -0
- data/doc/rdoc/Log4r/rdoc/formatter.html +218 -0
- data/doc/rdoc/Log4r/rdoc/log4r.html +286 -0
- data/doc/rdoc/Log4r/rdoc/logger.html +382 -0
- data/doc/rdoc/Log4r/rdoc/logserver.html +265 -0
- data/doc/rdoc/Log4r/rdoc/outputter.html +313 -0
- data/doc/rdoc/Log4r/rdoc/patternformatter.html +331 -0
- data/doc/rdoc/Log4r/rdoc/syslogoutputter.html +197 -0
- data/doc/rdoc/Log4r/rdoc/win32eventoutputter.html +165 -0
- data/doc/rdoc/Log4r/rdoc/yamlconfigurator.html +187 -0
- data/doc/rdoc/Log4r/repository_rb.html +74 -0
- data/doc/rdoc/Log4r/staticlogger_rb.html +55 -0
- data/doc/rdoc/Log4r/yamlconfigurator_rb.html +95 -0
- data/doc/rdoc/REXML.html +211 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/images/brick.png +0 -0
- data/doc/rdoc/images/brick_link.png +0 -0
- data/doc/rdoc/images/bug.png +0 -0
- data/doc/rdoc/images/bullet_black.png +0 -0
- data/doc/rdoc/images/bullet_toggle_minus.png +0 -0
- data/doc/rdoc/images/bullet_toggle_plus.png +0 -0
- data/doc/rdoc/images/date.png +0 -0
- data/doc/rdoc/images/find.png +0 -0
- data/doc/rdoc/images/loadingAnimation.gif +0 -0
- data/doc/rdoc/images/macFFBgHack.png +0 -0
- data/doc/rdoc/images/package.png +0 -0
- data/doc/rdoc/images/page_green.png +0 -0
- data/doc/rdoc/images/page_white_text.png +0 -0
- data/doc/rdoc/images/page_white_width.png +0 -0
- data/doc/rdoc/images/plugin.png +0 -0
- data/doc/rdoc/images/ruby.png +0 -0
- data/doc/rdoc/images/tag_green.png +0 -0
- data/doc/rdoc/images/wrench.png +0 -0
- data/doc/rdoc/images/wrench_orange.png +0 -0
- data/doc/rdoc/images/zoom.png +0 -0
- data/doc/rdoc/index.html +585 -0
- data/doc/rdoc/js/darkfish.js +116 -0
- data/doc/rdoc/js/jquery.js +32 -0
- data/doc/rdoc/js/quicksearch.js +114 -0
- data/doc/rdoc/js/thickbox-compressed.js +10 -0
- data/doc/rdoc/log4r-rdoc.css +696 -0
- data/doc/rdoc/log4r_rb.html +207 -0
- data/doc/rdoc/rdoc.css +696 -0
- data/examples/rdoc-gen +2 -0
- data/src/log4r.rb +2 -2
- data/src/log4r/formatter/patternformatter.rb +15 -15
- data/src/log4r/outputter/udpoutputter.rb +4 -4
- data/tests/testchainsaw.rb +1 -1
- metadata +123 -8
- data/src/log4r/outputter/datefileoutputter.patch +0 -24
- data/src/log4r/outputter/diff +0 -14
- data/src/log4r/outputter/new-datefileoutputter.rb +0 -117
@@ -0,0 +1,388 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Log4r::BasicFormatter</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../log4r/formatter/formatter_rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="log4r/formatter/formatter.rb">log4r/formatter/formatter.rb</a></li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="class-metadata">
|
42
|
+
|
43
|
+
<!-- Parent Class -->
|
44
|
+
|
45
|
+
<div id="parent-class-section" class="section">
|
46
|
+
<h3 class="section-header">Parent</h3>
|
47
|
+
|
48
|
+
<p class="link">SimpleFormatter</p>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
|
52
|
+
|
53
|
+
<!-- Namespace Contents -->
|
54
|
+
|
55
|
+
|
56
|
+
<!-- Method Quickref -->
|
57
|
+
|
58
|
+
<div id="method-list-section" class="section">
|
59
|
+
<h3 class="section-header">Methods</h3>
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="#M000011">::new</a></li>
|
63
|
+
|
64
|
+
<li><a href="#M000012">#format</a></li>
|
65
|
+
|
66
|
+
<li><a href="#M000013">#format_object</a></li>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
|
72
|
+
<!-- Included Modules -->
|
73
|
+
|
74
|
+
</div>
|
75
|
+
|
76
|
+
<div id="project-metadata">
|
77
|
+
|
78
|
+
|
79
|
+
<div id="fileindex-section" class="section project-section">
|
80
|
+
<h3 class="section-header">Files</h3>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
|
84
|
+
|
85
|
+
<li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
|
86
|
+
|
87
|
+
<li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
|
88
|
+
|
89
|
+
<li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
|
90
|
+
|
91
|
+
<li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
|
92
|
+
|
93
|
+
<li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
|
94
|
+
|
95
|
+
<li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
|
96
|
+
|
97
|
+
<li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
|
98
|
+
|
99
|
+
<li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
|
100
|
+
|
101
|
+
<li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
|
102
|
+
|
103
|
+
<li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
|
104
|
+
|
105
|
+
<li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
|
106
|
+
|
107
|
+
<li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
|
108
|
+
|
109
|
+
<li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
|
110
|
+
|
111
|
+
</ul>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
<div id="classindex-section" class="section project-section">
|
116
|
+
<h3 class="section-header">Class Index
|
117
|
+
<span class="search-toggle"><img src="../images/find.png"
|
118
|
+
height="16" width="16" alt="[+]"
|
119
|
+
title="show/hide quicksearch" /></span></h3>
|
120
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
121
|
+
<fieldset>
|
122
|
+
<legend>Quicksearch</legend>
|
123
|
+
<input type="text" name="quicksearch" value=""
|
124
|
+
class="quicksearch-field" />
|
125
|
+
</fieldset>
|
126
|
+
</form>
|
127
|
+
|
128
|
+
<ul class="link-list">
|
129
|
+
|
130
|
+
<li><a href="../Log4r.html">Log4r</a></li>
|
131
|
+
|
132
|
+
<li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
|
133
|
+
|
134
|
+
<li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
|
135
|
+
|
136
|
+
<li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
|
137
|
+
|
138
|
+
<li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
|
139
|
+
|
140
|
+
<li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
|
141
|
+
|
142
|
+
<li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
|
143
|
+
|
144
|
+
<li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
|
145
|
+
|
146
|
+
<li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
|
147
|
+
|
148
|
+
<li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
|
149
|
+
|
150
|
+
<li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
|
151
|
+
|
152
|
+
<li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
|
153
|
+
|
154
|
+
<li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
|
155
|
+
|
156
|
+
<li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
|
157
|
+
|
158
|
+
<li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
|
159
|
+
|
160
|
+
<li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
|
161
|
+
|
162
|
+
<li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
|
163
|
+
|
164
|
+
<li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
|
165
|
+
|
166
|
+
<li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
|
167
|
+
|
168
|
+
<li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
|
169
|
+
|
170
|
+
<li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
|
171
|
+
|
172
|
+
<li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
|
173
|
+
|
174
|
+
<li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
|
175
|
+
|
176
|
+
<li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
|
177
|
+
|
178
|
+
<li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
|
179
|
+
|
180
|
+
<li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
|
181
|
+
|
182
|
+
<li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
|
183
|
+
|
184
|
+
<li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
|
185
|
+
|
186
|
+
<li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
|
187
|
+
|
188
|
+
<li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
|
189
|
+
|
190
|
+
</ul>
|
191
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
</div>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div id="documentation">
|
199
|
+
<h1 class="class">Log4r::BasicFormatter</h1>
|
200
|
+
|
201
|
+
<div id="description">
|
202
|
+
<p>
|
203
|
+
<a href="BasicFormatter.html">BasicFormatter</a> produces output like this:
|
204
|
+
</p>
|
205
|
+
<pre>
|
206
|
+
WARN loggername: I dropped my Wookie!
|
207
|
+
</pre>
|
208
|
+
<p>
|
209
|
+
Or like this if trace is on:
|
210
|
+
</p>
|
211
|
+
<pre>
|
212
|
+
WARN loggername(file.rb at 12): Hot potato!
|
213
|
+
</pre>
|
214
|
+
<p>
|
215
|
+
Also, it will pretty-print any Exception it gets and <tt>inspect</tt>
|
216
|
+
everything else.
|
217
|
+
</p>
|
218
|
+
<p>
|
219
|
+
Hash arguments include:
|
220
|
+
</p>
|
221
|
+
<table>
|
222
|
+
<tr><td valign="top"><tt>depth</tt>:</td><td>How many lines of the stacktrace to display.
|
223
|
+
|
224
|
+
</td></tr>
|
225
|
+
</table>
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<!-- Constants -->
|
230
|
+
|
231
|
+
|
232
|
+
<!-- Attributes -->
|
233
|
+
|
234
|
+
|
235
|
+
<!-- Methods -->
|
236
|
+
|
237
|
+
<div id="public-class-method-details" class="method-section section">
|
238
|
+
<h3 class="section-header">Public Class Methods</h3>
|
239
|
+
|
240
|
+
|
241
|
+
<div id="new-method" class="method-detail ">
|
242
|
+
<a name="M000011"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
|
246
|
+
<span class="method-name">new</span><span
|
247
|
+
class="method-args">(hash={})</span>
|
248
|
+
<span class="method-click-advice">click to toggle source</span>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div class="method-description">
|
253
|
+
|
254
|
+
<p class="missing-docs">(Not documented)</p>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<div class="method-source-code"
|
259
|
+
id="new-source">
|
260
|
+
<pre>
|
261
|
+
<span class="ruby-comment cmt"># File log4r/formatter/formatter.rb, line 51</span>
|
262
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>={})
|
263
|
+
<span class="ruby-ivar">@depth</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:depth</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'depth'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-value">7</span>).<span class="ruby-identifier">to_i</span>
|
264
|
+
<span class="ruby-keyword kw">end</span></pre>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
<div id="public-instance-method-details" class="method-section section">
|
276
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
277
|
+
|
278
|
+
|
279
|
+
<div id="format-method" class="method-detail ">
|
280
|
+
<a name="M000012"></a>
|
281
|
+
|
282
|
+
<div class="method-heading">
|
283
|
+
|
284
|
+
<span class="method-name">format</span><span
|
285
|
+
class="method-args">(event)</span>
|
286
|
+
<span class="method-click-advice">click to toggle source</span>
|
287
|
+
|
288
|
+
</div>
|
289
|
+
|
290
|
+
<div class="method-description">
|
291
|
+
|
292
|
+
<p class="missing-docs">(Not documented)</p>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<div class="method-source-code"
|
297
|
+
id="format-source">
|
298
|
+
<pre>
|
299
|
+
<span class="ruby-comment cmt"># File log4r/formatter/formatter.rb, line 55</span>
|
300
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">event</span>)
|
301
|
+
<span class="ruby-identifier">buff</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-ivar">@@basicformat</span>, <span class="ruby-constant">MaxLevelLength</span>, <span class="ruby-constant">LNAMES</span>[<span class="ruby-identifier">event</span>.<span class="ruby-identifier">level</span>],
|
302
|
+
<span class="ruby-identifier">event</span>.<span class="ruby-identifier">name</span>)
|
303
|
+
<span class="ruby-identifier">buff</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">event</span>.<span class="ruby-identifier">tracer</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-value str">""</span> <span class="ruby-operator">:</span> <span class="ruby-node">"(#{event.tracer[0]})"</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">": "</span>
|
304
|
+
<span class="ruby-identifier">buff</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">format_object</span>(<span class="ruby-identifier">event</span>.<span class="ruby-identifier">data</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span>
|
305
|
+
<span class="ruby-identifier">buff</span>
|
306
|
+
<span class="ruby-keyword kw">end</span></pre>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
</div>
|
313
|
+
|
314
|
+
|
315
|
+
<div id="format-object-method" class="method-detail ">
|
316
|
+
<a name="M000013"></a>
|
317
|
+
|
318
|
+
<div class="method-heading">
|
319
|
+
|
320
|
+
<span class="method-name">format_object</span><span
|
321
|
+
class="method-args">(obj)</span>
|
322
|
+
<span class="method-click-advice">click to toggle source</span>
|
323
|
+
|
324
|
+
</div>
|
325
|
+
|
326
|
+
<div class="method-description">
|
327
|
+
|
328
|
+
<p>
|
329
|
+
Formats data according to its class:
|
330
|
+
</p>
|
331
|
+
<table>
|
332
|
+
<tr><td valign="top">String:</td><td>Prints it out as normal.
|
333
|
+
|
334
|
+
</td></tr>
|
335
|
+
<tr><td valign="top">Exception:</td><td>Produces output similar to command-line exceptions.
|
336
|
+
|
337
|
+
</td></tr>
|
338
|
+
<tr><td valign="top">Object:</td><td>Prints the type of object, then the output of <tt>inspect</tt>. An example
|
339
|
+
— Array: [1, 2, 3]
|
340
|
+
|
341
|
+
</td></tr>
|
342
|
+
</table>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
<div class="method-source-code"
|
347
|
+
id="format-object-source">
|
348
|
+
<pre>
|
349
|
+
<span class="ruby-comment cmt"># File log4r/formatter/formatter.rb, line 70</span>
|
350
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_object</span>(<span class="ruby-identifier">obj</span>)
|
351
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Exception</span>
|
352
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"Caught #{obj.class}: #{obj.message}\n\t"</span> <span class="ruby-operator">+</span>\
|
353
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">backtrace</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-ivar">@depth</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n\t"</span>)
|
354
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
|
355
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">obj</span>
|
356
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># inspect the object</span>
|
357
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{obj.class}: #{obj.inspect}"</span>
|
358
|
+
<span class="ruby-keyword kw">end</span>
|
359
|
+
<span class="ruby-keyword kw">end</span></pre>
|
360
|
+
</div>
|
361
|
+
|
362
|
+
</div>
|
363
|
+
|
364
|
+
|
365
|
+
</div>
|
366
|
+
|
367
|
+
|
368
|
+
</div>
|
369
|
+
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
|
374
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
375
|
+
|
376
|
+
<p>Disabled; run with --debug to generate this.</p>
|
377
|
+
|
378
|
+
</div>
|
379
|
+
|
380
|
+
<div id="validator-badges">
|
381
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
382
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
383
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
384
|
+
</div>
|
385
|
+
|
386
|
+
</body>
|
387
|
+
</html>
|
388
|
+
|
@@ -0,0 +1,225 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Log4r::ConfigError</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../log4r/configurator_rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="log4r/configurator.rb">log4r/configurator.rb</a></li>
|
33
|
+
|
34
|
+
<li><a href="../log4r/yamlconfigurator_rb.html?TB_iframe=true&height=550&width=785"
|
35
|
+
class="thickbox" title="log4r/yamlconfigurator.rb">log4r/yamlconfigurator.rb</a></li>
|
36
|
+
|
37
|
+
</ul>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div id="class-metadata">
|
45
|
+
|
46
|
+
<!-- Parent Class -->
|
47
|
+
|
48
|
+
<div id="parent-class-section" class="section">
|
49
|
+
<h3 class="section-header">Parent</h3>
|
50
|
+
|
51
|
+
<p class="link">Exception</p>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
|
56
|
+
<!-- Namespace Contents -->
|
57
|
+
|
58
|
+
|
59
|
+
<!-- Method Quickref -->
|
60
|
+
|
61
|
+
|
62
|
+
<!-- Included Modules -->
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div id="project-metadata">
|
67
|
+
|
68
|
+
|
69
|
+
<div id="fileindex-section" class="section project-section">
|
70
|
+
<h3 class="section-header">Files</h3>
|
71
|
+
<ul>
|
72
|
+
|
73
|
+
<li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
|
74
|
+
|
75
|
+
<li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
|
76
|
+
|
77
|
+
<li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
|
78
|
+
|
79
|
+
<li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
|
80
|
+
|
81
|
+
<li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
|
82
|
+
|
83
|
+
<li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
|
84
|
+
|
85
|
+
<li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
|
86
|
+
|
87
|
+
<li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
|
88
|
+
|
89
|
+
<li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
|
90
|
+
|
91
|
+
<li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
|
92
|
+
|
93
|
+
<li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
|
94
|
+
|
95
|
+
<li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
|
96
|
+
|
97
|
+
<li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
|
98
|
+
|
99
|
+
<li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
|
100
|
+
|
101
|
+
</ul>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<div id="classindex-section" class="section project-section">
|
106
|
+
<h3 class="section-header">Class Index
|
107
|
+
<span class="search-toggle"><img src="../images/find.png"
|
108
|
+
height="16" width="16" alt="[+]"
|
109
|
+
title="show/hide quicksearch" /></span></h3>
|
110
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
111
|
+
<fieldset>
|
112
|
+
<legend>Quicksearch</legend>
|
113
|
+
<input type="text" name="quicksearch" value=""
|
114
|
+
class="quicksearch-field" />
|
115
|
+
</fieldset>
|
116
|
+
</form>
|
117
|
+
|
118
|
+
<ul class="link-list">
|
119
|
+
|
120
|
+
<li><a href="../Log4r.html">Log4r</a></li>
|
121
|
+
|
122
|
+
<li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
|
123
|
+
|
124
|
+
<li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
|
125
|
+
|
126
|
+
<li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
|
127
|
+
|
128
|
+
<li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
|
129
|
+
|
130
|
+
<li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
|
131
|
+
|
132
|
+
<li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
|
133
|
+
|
134
|
+
<li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
|
135
|
+
|
136
|
+
<li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
|
137
|
+
|
138
|
+
<li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
|
139
|
+
|
140
|
+
<li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
|
141
|
+
|
142
|
+
<li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
|
143
|
+
|
144
|
+
<li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
|
145
|
+
|
146
|
+
<li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
|
147
|
+
|
148
|
+
<li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
|
149
|
+
|
150
|
+
<li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
|
151
|
+
|
152
|
+
<li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
|
153
|
+
|
154
|
+
<li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
|
155
|
+
|
156
|
+
<li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
|
157
|
+
|
158
|
+
<li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
|
159
|
+
|
160
|
+
<li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
|
161
|
+
|
162
|
+
<li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
|
163
|
+
|
164
|
+
<li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
|
165
|
+
|
166
|
+
<li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
|
167
|
+
|
168
|
+
<li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
|
169
|
+
|
170
|
+
<li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
|
171
|
+
|
172
|
+
<li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
|
173
|
+
|
174
|
+
<li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
|
175
|
+
|
176
|
+
<li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
|
177
|
+
|
178
|
+
<li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
|
179
|
+
|
180
|
+
</ul>
|
181
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div id="documentation">
|
189
|
+
<h1 class="class">Log4r::ConfigError</h1>
|
190
|
+
|
191
|
+
<div id="description">
|
192
|
+
<p>
|
193
|
+
Gets raised when <a href="Configurator.html">Configurator</a> encounters
|
194
|
+
bad YAML.
|
195
|
+
</p>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<!-- Constants -->
|
200
|
+
|
201
|
+
|
202
|
+
<!-- Attributes -->
|
203
|
+
|
204
|
+
|
205
|
+
<!-- Methods -->
|
206
|
+
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
212
|
+
|
213
|
+
<p>Disabled; run with --debug to generate this.</p>
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
<div id="validator-badges">
|
218
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
219
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
220
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
</body>
|
224
|
+
</html>
|
225
|
+
|