log4r 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -3
- data/Rakefile +3 -3
- data/doc/rdoc-log4r.css +696 -0
- data/examples/syslogcustom.rb +6 -1
- data/src/doc/Log4r.html +392 -0
- data/src/doc/Log4r/BasicFormatter.html +370 -0
- data/src/doc/Log4r/ConfigError.html +207 -0
- data/src/doc/Log4r/Configurator.html +1050 -0
- data/src/doc/Log4r/DateFileOutputter.html +454 -0
- data/src/doc/Log4r/DefaultFormatter.html +205 -0
- data/src/doc/Log4r/EmailOutputter.html +636 -0
- data/src/doc/Log4r/FileOutputter.html +321 -0
- data/src/doc/Log4r/Formatter.html +291 -0
- data/src/doc/Log4r/IOOutputter.html +392 -0
- data/src/doc/Log4r/Log4rConfig.html +193 -0
- data/src/doc/Log4r/Log4rTools.html +370 -0
- data/src/doc/Log4r/LogEvent.html +360 -0
- data/src/doc/Log4r/LogServer.html +322 -0
- data/src/doc/Log4r/Logger.html +1132 -0
- data/src/doc/Log4r/Logger/LoggerFactory.html +200 -0
- data/src/doc/Log4r/Logger/Repository.html +207 -0
- data/src/doc/Log4r/ObjectFormatter.html +262 -0
- data/src/doc/Log4r/Outputter.html +910 -0
- data/src/doc/Log4r/Outputter/OutputterFactory.html +200 -0
- data/src/doc/Log4r/Outputter/consoleoutputters_rb.html +57 -0
- data/src/doc/Log4r/Outputter/datefileoutputter_rb.html +93 -0
- data/src/doc/Log4r/Outputter/emailoutputter_rb.html +179 -0
- data/src/doc/Log4r/Outputter/fileoutputter_rb.html +64 -0
- data/src/doc/Log4r/Outputter/iooutputter_rb.html +59 -0
- data/src/doc/Log4r/Outputter/outputter_rb.html +222 -0
- data/src/doc/Log4r/Outputter/outputterfactory_rb.html +62 -0
- data/src/doc/Log4r/Outputter/remoteoutputter_rb.html +59 -0
- data/src/doc/Log4r/Outputter/rollingfileoutputter_rb.html +66 -0
- data/src/doc/Log4r/Outputter/staticoutputter_rb.html +55 -0
- data/src/doc/Log4r/Outputter/syslogoutputter_rb.html +110 -0
- data/src/doc/Log4r/Outputter/tst_rb.html +54 -0
- data/src/doc/Log4r/PatternFormatter.html +422 -0
- data/src/doc/Log4r/ROMPClient.html +193 -0
- data/src/doc/Log4r/ROMPServer.html +193 -0
- data/src/doc/Log4r/RemoteOutputter.html +384 -0
- data/src/doc/Log4r/RollingFileOutputter.html +528 -0
- data/src/doc/Log4r/RootLogger.html +512 -0
- data/src/doc/Log4r/SimpleFormatter.html +258 -0
- data/src/doc/Log4r/StderrOutputter.html +250 -0
- data/src/doc/Log4r/StdoutOutputter.html +250 -0
- data/src/doc/Log4r/SyslogOutputter.html +533 -0
- data/src/doc/Log4r/YamlConfigurator.html +948 -0
- data/src/doc/Log4r/base_rb.html +57 -0
- data/src/doc/Log4r/config_rb.html +76 -0
- data/src/doc/Log4r/configurator_rb.html +370 -0
- data/src/doc/Log4r/formatter/formatter_rb.html +121 -0
- data/src/doc/Log4r/formatter/patternformatter_rb.html +233 -0
- data/src/doc/Log4r/lib/drbloader_rb.html +57 -0
- data/src/doc/Log4r/lib/xmlloader_rb.html +57 -0
- data/src/doc/Log4r/logevent_rb.html +55 -0
- data/src/doc/Log4r/logger_rb.html +293 -0
- data/src/doc/Log4r/loggerfactory_rb.html +66 -0
- data/src/doc/Log4r/logserver_rb.html +161 -0
- data/src/doc/Log4r/rdoc/configurator.html +444 -0
- data/src/doc/Log4r/rdoc/emailoutputter.html +261 -0
- data/src/doc/Log4r/rdoc/formatter.html +200 -0
- data/src/doc/Log4r/rdoc/log4r.html +268 -0
- data/src/doc/Log4r/rdoc/logger.html +364 -0
- data/src/doc/Log4r/rdoc/logserver.html +247 -0
- data/src/doc/Log4r/rdoc/outputter.html +295 -0
- data/src/doc/Log4r/rdoc/patternformatter.html +313 -0
- data/src/doc/Log4r/rdoc/syslogoutputter.html +179 -0
- data/src/doc/Log4r/rdoc/yamlconfigurator.html +169 -0
- data/src/doc/Log4r/repository_rb.html +62 -0
- data/src/doc/Log4r/staticlogger_rb.html +55 -0
- data/src/doc/Log4r/yamlconfigurator_rb.html +95 -0
- data/src/doc/REXML.html +193 -0
- data/src/doc/created.rid +1 -0
- data/src/doc/images/brick.png +0 -0
- data/src/doc/images/brick_link.png +0 -0
- data/src/doc/images/bug.png +0 -0
- data/src/doc/images/bullet_black.png +0 -0
- data/src/doc/images/bullet_toggle_minus.png +0 -0
- data/src/doc/images/bullet_toggle_plus.png +0 -0
- data/src/doc/images/date.png +0 -0
- data/src/doc/images/find.png +0 -0
- data/src/doc/images/loadingAnimation.gif +0 -0
- data/src/doc/images/macFFBgHack.png +0 -0
- data/src/doc/images/package.png +0 -0
- data/src/doc/images/page_green.png +0 -0
- data/src/doc/images/page_white_text.png +0 -0
- data/src/doc/images/page_white_width.png +0 -0
- data/src/doc/images/plugin.png +0 -0
- data/src/doc/images/ruby.png +0 -0
- data/src/doc/images/tag_green.png +0 -0
- data/src/doc/images/wrench.png +0 -0
- data/src/doc/images/wrench_orange.png +0 -0
- data/src/doc/images/zoom.png +0 -0
- data/src/doc/index.html +384 -0
- data/src/doc/js/darkfish.js +116 -0
- data/src/doc/js/jquery.js +32 -0
- data/src/doc/js/quicksearch.js +114 -0
- data/src/doc/js/thickbox-compressed.js +10 -0
- data/src/doc/rdoc.css +696 -0
- data/src/log4r.rb +2 -2
- data/src/log4r/formatter/patternformatter.rb +18 -2
- data/src/log4r/logger.rb +2 -2
- data/src/log4r/outputter/emailoutputter.rb +2 -0
- data/src/log4r/outputter/syslogoutputter.rb +29 -9
- data/src/log4r/outputter/tst.rb +8 -0
- metadata +99 -3
- data/examples/logs/simple.log +0 -1
@@ -0,0 +1,370 @@
|
|
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::Log4rTools</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/base_rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="log4r/base.rb">log4r/base.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">Object</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="#M000005">::comma_split</a></li>
|
63
|
+
|
64
|
+
<li><a href="#M000004">::decode_bool</a></li>
|
65
|
+
|
66
|
+
<li><a href="#M000002">::valid_level?</a></li>
|
67
|
+
|
68
|
+
<li><a href="#M000001">::validate_level</a></li>
|
69
|
+
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
<!-- Included Modules -->
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div id="project-metadata">
|
79
|
+
|
80
|
+
|
81
|
+
<div id="fileindex-section" class="section project-section">
|
82
|
+
<h3 class="section-header">Files</h3>
|
83
|
+
<ul>
|
84
|
+
|
85
|
+
<li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
|
86
|
+
|
87
|
+
<li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
|
88
|
+
|
89
|
+
<li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
|
90
|
+
|
91
|
+
<li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
|
92
|
+
|
93
|
+
<li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
|
94
|
+
|
95
|
+
<li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
|
96
|
+
|
97
|
+
<li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
|
98
|
+
|
99
|
+
<li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
|
100
|
+
|
101
|
+
<li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
|
102
|
+
|
103
|
+
<li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
|
104
|
+
|
105
|
+
</ul>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
|
109
|
+
<div id="classindex-section" class="section project-section">
|
110
|
+
<h3 class="section-header">Class Index
|
111
|
+
<span class="search-toggle"><img src="../images/find.png"
|
112
|
+
height="16" width="16" alt="[+]"
|
113
|
+
title="show/hide quicksearch" /></span></h3>
|
114
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
115
|
+
<fieldset>
|
116
|
+
<legend>Quicksearch</legend>
|
117
|
+
<input type="text" name="quicksearch" value=""
|
118
|
+
class="quicksearch-field" />
|
119
|
+
</fieldset>
|
120
|
+
</form>
|
121
|
+
|
122
|
+
<ul class="link-list">
|
123
|
+
|
124
|
+
<li><a href="../Log4r.html">Log4r</a></li>
|
125
|
+
|
126
|
+
<li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
|
127
|
+
|
128
|
+
<li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
|
129
|
+
|
130
|
+
<li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
|
131
|
+
|
132
|
+
<li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
|
133
|
+
|
134
|
+
<li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
|
135
|
+
|
136
|
+
<li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
|
137
|
+
|
138
|
+
<li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
|
139
|
+
|
140
|
+
<li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
|
141
|
+
|
142
|
+
<li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</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/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
|
153
|
+
|
154
|
+
<li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
|
155
|
+
|
156
|
+
<li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
|
157
|
+
|
158
|
+
<li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
|
159
|
+
|
160
|
+
<li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
|
161
|
+
|
162
|
+
<li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
|
163
|
+
|
164
|
+
<li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
|
165
|
+
|
166
|
+
<li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
|
167
|
+
|
168
|
+
<li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
|
169
|
+
|
170
|
+
<li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
|
171
|
+
|
172
|
+
<li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
|
173
|
+
|
174
|
+
</ul>
|
175
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="documentation">
|
183
|
+
<h1 class="class">Log4r::Log4rTools</h1>
|
184
|
+
|
185
|
+
<div id="description">
|
186
|
+
<p>
|
187
|
+
Some common functions
|
188
|
+
</p>
|
189
|
+
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<!-- Constants -->
|
193
|
+
|
194
|
+
|
195
|
+
<!-- Attributes -->
|
196
|
+
|
197
|
+
|
198
|
+
<!-- Methods -->
|
199
|
+
|
200
|
+
<div id="public-class-method-details" class="method-section section">
|
201
|
+
<h3 class="section-header">Public Class Methods</h3>
|
202
|
+
|
203
|
+
|
204
|
+
<div id="comma-split-method" class="method-detail ">
|
205
|
+
<a name="M000005"></a>
|
206
|
+
|
207
|
+
<div class="method-heading">
|
208
|
+
|
209
|
+
<span class="method-name">comma_split</span><span
|
210
|
+
class="method-args">(string)</span>
|
211
|
+
<span class="method-click-advice">click to toggle source</span>
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
|
217
|
+
<p>
|
218
|
+
Splits comma-delimited lists with arbitrary s padding
|
219
|
+
</p>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<div class="method-source-code"
|
224
|
+
id="comma-split-source">
|
225
|
+
<pre>
|
226
|
+
<span class="ruby-comment cmt"># File log4r/base.rb, line 70</span>
|
227
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">comma_split</span>(<span class="ruby-identifier">string</span>)
|
228
|
+
<span class="ruby-identifier">string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\s*,\s*/</span>).<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">strip</span>}
|
229
|
+
<span class="ruby-keyword kw">end</span></pre>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</div>
|
233
|
+
|
234
|
+
|
235
|
+
</div>
|
236
|
+
|
237
|
+
|
238
|
+
<div id="decode-bool-method" class="method-detail ">
|
239
|
+
<a name="M000004"></a>
|
240
|
+
|
241
|
+
<div class="method-heading">
|
242
|
+
|
243
|
+
<span class="method-name">decode_bool</span><span
|
244
|
+
class="method-args">(hash, symbol, default)</span>
|
245
|
+
<span class="method-click-advice">click to toggle source</span>
|
246
|
+
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<div class="method-description">
|
250
|
+
|
251
|
+
<p>
|
252
|
+
Shortcut for decoding ‘true’, ‘false’, true, false
|
253
|
+
or nil into a bool from a hash parameter. E.g., it looks for true/false
|
254
|
+
values for the keys ‘symbol’ and :symbol.
|
255
|
+
</p>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<div class="method-source-code"
|
260
|
+
id="decode-bool-source">
|
261
|
+
<pre>
|
262
|
+
<span class="ruby-comment cmt"># File log4r/base.rb, line 59</span>
|
263
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_bool</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">default</span>)
|
264
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">symbol</span>]
|
265
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">nil?</span>
|
266
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">data</span>
|
267
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'true'</span>,<span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">true</span>
|
268
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'false'</span>,<span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">false</span>
|
269
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-identifier">default</span>
|
270
|
+
<span class="ruby-keyword kw">end</span>
|
271
|
+
<span class="ruby-keyword kw">end</span></pre>
|
272
|
+
</div>
|
273
|
+
|
274
|
+
</div>
|
275
|
+
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
|
280
|
+
<div id="valid-level--method" class="method-detail ">
|
281
|
+
<a name="M000002"></a>
|
282
|
+
|
283
|
+
<div class="method-heading">
|
284
|
+
|
285
|
+
<span class="method-name">valid_level?</span><span
|
286
|
+
class="method-args">(lev)</span>
|
287
|
+
<span class="method-click-advice">click to toggle source</span>
|
288
|
+
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div class="method-description">
|
292
|
+
|
293
|
+
<p class="missing-docs">(Not documented)</p>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
<div class="method-source-code"
|
298
|
+
id="valid-level--source">
|
299
|
+
<pre>
|
300
|
+
<span class="ruby-comment cmt"># File log4r/base.rb, line 45</span>
|
301
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">valid_level?</span>(<span class="ruby-identifier">lev</span>)
|
302
|
+
<span class="ruby-keyword kw">not</span> <span class="ruby-identifier">lev</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">lev</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Numeric</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">lev</span> <span class="ruby-operator">>=</span> <span class="ruby-constant">ALL</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">lev</span> <span class="ruby-operator"><=</span> <span class="ruby-constant">OFF</span>
|
303
|
+
<span class="ruby-keyword kw">end</span></pre>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
</div>
|
307
|
+
|
308
|
+
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
<div id="validate-level-method" class="method-detail ">
|
313
|
+
<a name="M000001"></a>
|
314
|
+
|
315
|
+
<div class="method-heading">
|
316
|
+
|
317
|
+
<span class="method-name">validate_level</span><span
|
318
|
+
class="method-args">(level, depth=0)</span>
|
319
|
+
<span class="method-click-advice">click to toggle source</span>
|
320
|
+
|
321
|
+
</div>
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
|
325
|
+
<p>
|
326
|
+
Raises ArgumentError if level argument is an invalid level. Depth specifies
|
327
|
+
how many trace entries to remove.
|
328
|
+
</p>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
<div class="method-source-code"
|
333
|
+
id="validate-level-source">
|
334
|
+
<pre>
|
335
|
+
<span class="ruby-comment cmt"># File log4r/base.rb, line 38</span>
|
336
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">level</span>, <span class="ruby-identifier">depth</span>=<span class="ruby-value">0</span>)
|
337
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_level?</span>(<span class="ruby-identifier">level</span>)
|
338
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Log level must be in 0..#{LEVELS}"</span>,
|
339
|
+
<span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span>(<span class="ruby-identifier">depth</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)]
|
340
|
+
<span class="ruby-keyword kw">end</span>
|
341
|
+
<span class="ruby-keyword kw">end</span></pre>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
</div>
|
345
|
+
|
346
|
+
|
347
|
+
</div>
|
348
|
+
|
349
|
+
|
350
|
+
</div>
|
351
|
+
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
357
|
+
|
358
|
+
<p>Disabled; run with --debug to generate this.</p>
|
359
|
+
|
360
|
+
</div>
|
361
|
+
|
362
|
+
<div id="validator-badges">
|
363
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
364
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
365
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
366
|
+
</div>
|
367
|
+
|
368
|
+
</body>
|
369
|
+
</html>
|
370
|
+
|
@@ -0,0 +1,360 @@
|
|
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::LogEvent</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/logevent_rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="log4r/logevent.rb">log4r/logevent.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">Object</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="#M000036">::new</a></li>
|
63
|
+
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
<!-- Included Modules -->
|
69
|
+
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<div id="project-metadata">
|
73
|
+
|
74
|
+
|
75
|
+
<div id="fileindex-section" class="section project-section">
|
76
|
+
<h3 class="section-header">Files</h3>
|
77
|
+
<ul>
|
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/yamlconfigurator.html">yamlconfigurator</a></li>
|
98
|
+
|
99
|
+
</ul>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<div id="classindex-section" class="section project-section">
|
104
|
+
<h3 class="section-header">Class Index
|
105
|
+
<span class="search-toggle"><img src="../images/find.png"
|
106
|
+
height="16" width="16" alt="[+]"
|
107
|
+
title="show/hide quicksearch" /></span></h3>
|
108
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
109
|
+
<fieldset>
|
110
|
+
<legend>Quicksearch</legend>
|
111
|
+
<input type="text" name="quicksearch" value=""
|
112
|
+
class="quicksearch-field" />
|
113
|
+
</fieldset>
|
114
|
+
</form>
|
115
|
+
|
116
|
+
<ul class="link-list">
|
117
|
+
|
118
|
+
<li><a href="../Log4r.html">Log4r</a></li>
|
119
|
+
|
120
|
+
<li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
|
121
|
+
|
122
|
+
<li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
|
123
|
+
|
124
|
+
<li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
|
125
|
+
|
126
|
+
<li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
|
127
|
+
|
128
|
+
<li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
|
129
|
+
|
130
|
+
<li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
|
131
|
+
|
132
|
+
<li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
|
133
|
+
|
134
|
+
<li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
|
135
|
+
|
136
|
+
<li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
|
137
|
+
|
138
|
+
<li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
|
139
|
+
|
140
|
+
<li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
|
141
|
+
|
142
|
+
<li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
|
143
|
+
|
144
|
+
<li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
|
145
|
+
|
146
|
+
<li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
|
147
|
+
|
148
|
+
<li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
|
149
|
+
|
150
|
+
<li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
|
151
|
+
|
152
|
+
<li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
|
153
|
+
|
154
|
+
<li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
|
155
|
+
|
156
|
+
<li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
|
157
|
+
|
158
|
+
<li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
|
159
|
+
|
160
|
+
<li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
|
161
|
+
|
162
|
+
<li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
|
163
|
+
|
164
|
+
<li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
|
165
|
+
|
166
|
+
<li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
|
167
|
+
|
168
|
+
</ul>
|
169
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div id="documentation">
|
177
|
+
<h1 class="class">Log4r::LogEvent</h1>
|
178
|
+
|
179
|
+
<div id="description">
|
180
|
+
<p>
|
181
|
+
<a href="LogEvent.html">LogEvent</a> wraps up all the miscellaneous data
|
182
|
+
associated with a logging statement. It gets passed around to the varied
|
183
|
+
components of <a href="../Log4r.html">Log4r</a> and should be of interest
|
184
|
+
to those creating extensions.
|
185
|
+
</p>
|
186
|
+
<p>
|
187
|
+
Data contained:
|
188
|
+
</p>
|
189
|
+
<dl>
|
190
|
+
<dt>level</dt><dd>The integer level of the log event. Use LNAMES[level] to get the actual
|
191
|
+
level name.
|
192
|
+
|
193
|
+
</dd>
|
194
|
+
<dt>tracer</dt><dd>The execution stack returned by <tt>caller</tt> at the log event. It is nil
|
195
|
+
if the invoked Logger’s trace is false.
|
196
|
+
|
197
|
+
</dd>
|
198
|
+
<dt>data</dt><dd>The object that was passed into the logging method.
|
199
|
+
|
200
|
+
</dd>
|
201
|
+
<dt>name</dt><dd>The name of the logger that was invoked.
|
202
|
+
|
203
|
+
</dd>
|
204
|
+
<dt>fullname</dt><dd>The fully qualified name of the logger that was invoked.
|
205
|
+
|
206
|
+
</dd>
|
207
|
+
</dl>
|
208
|
+
<p>
|
209
|
+
Note that creating timestamps is a task left to formatters.
|
210
|
+
</p>
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<!-- Constants -->
|
215
|
+
|
216
|
+
|
217
|
+
<!-- Attributes -->
|
218
|
+
|
219
|
+
<div id="attribute-method-details" class="method-section section">
|
220
|
+
<h3 class="section-header">Attributes</h3>
|
221
|
+
|
222
|
+
|
223
|
+
<div id="level-attribute-method" class="method-detail">
|
224
|
+
<a name="level"></a>
|
225
|
+
|
226
|
+
<div class="method-heading attribute-method-heading">
|
227
|
+
<span class="method-name">level</span><span
|
228
|
+
class="attribute-access-type">[R]</span>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div class="method-description">
|
232
|
+
|
233
|
+
<p class="missing-docs">(Not documented)</p>
|
234
|
+
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
<div id="tracer-attribute-method" class="method-detail">
|
239
|
+
<a name="tracer"></a>
|
240
|
+
|
241
|
+
<div class="method-heading attribute-method-heading">
|
242
|
+
<span class="method-name">tracer</span><span
|
243
|
+
class="attribute-access-type">[R]</span>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
<div class="method-description">
|
247
|
+
|
248
|
+
<p class="missing-docs">(Not documented)</p>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div id="data-attribute-method" class="method-detail">
|
254
|
+
<a name="data"></a>
|
255
|
+
|
256
|
+
<div class="method-heading attribute-method-heading">
|
257
|
+
<span class="method-name">data</span><span
|
258
|
+
class="attribute-access-type">[R]</span>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div class="method-description">
|
262
|
+
|
263
|
+
<p class="missing-docs">(Not documented)</p>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
</div>
|
267
|
+
|
268
|
+
<div id="name-attribute-method" class="method-detail">
|
269
|
+
<a name="name"></a>
|
270
|
+
|
271
|
+
<div class="method-heading attribute-method-heading">
|
272
|
+
<span class="method-name">name</span><span
|
273
|
+
class="attribute-access-type">[R]</span>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div class="method-description">
|
277
|
+
|
278
|
+
<p class="missing-docs">(Not documented)</p>
|
279
|
+
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
<div id="fullname-attribute-method" class="method-detail">
|
284
|
+
<a name="fullname"></a>
|
285
|
+
|
286
|
+
<div class="method-heading attribute-method-heading">
|
287
|
+
<span class="method-name">fullname</span><span
|
288
|
+
class="attribute-access-type">[R]</span>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div class="method-description">
|
292
|
+
|
293
|
+
<p class="missing-docs">(Not documented)</p>
|
294
|
+
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
</div>
|
299
|
+
|
300
|
+
|
301
|
+
<!-- Methods -->
|
302
|
+
|
303
|
+
<div id="public-class-method-details" class="method-section section">
|
304
|
+
<h3 class="section-header">Public Class Methods</h3>
|
305
|
+
|
306
|
+
|
307
|
+
<div id="new-method" class="method-detail ">
|
308
|
+
<a name="M000036"></a>
|
309
|
+
|
310
|
+
<div class="method-heading">
|
311
|
+
|
312
|
+
<span class="method-name">new</span><span
|
313
|
+
class="method-args">(level, logger, tracer, data)</span>
|
314
|
+
<span class="method-click-advice">click to toggle source</span>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
|
320
|
+
<p class="missing-docs">(Not documented)</p>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
<div class="method-source-code"
|
325
|
+
id="new-source">
|
326
|
+
<pre>
|
327
|
+
<span class="ruby-comment cmt"># File log4r/logevent.rb, line 23</span>
|
328
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">level</span>, <span class="ruby-identifier">logger</span>, <span class="ruby-identifier">tracer</span>, <span class="ruby-identifier">data</span>)
|
329
|
+
<span class="ruby-ivar">@level</span>, <span class="ruby-ivar">@tracer</span>, <span class="ruby-ivar">@data</span> = <span class="ruby-identifier">level</span>, <span class="ruby-identifier">tracer</span>, <span class="ruby-identifier">data</span>
|
330
|
+
<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@fullname</span> = <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">fullname</span>
|
331
|
+
<span class="ruby-keyword kw">end</span></pre>
|
332
|
+
</div>
|
333
|
+
|
334
|
+
</div>
|
335
|
+
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
|
340
|
+
</div>
|
341
|
+
|
342
|
+
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
347
|
+
|
348
|
+
<p>Disabled; run with --debug to generate this.</p>
|
349
|
+
|
350
|
+
</div>
|
351
|
+
|
352
|
+
<div id="validator-badges">
|
353
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
354
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
355
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
356
|
+
</div>
|
357
|
+
|
358
|
+
</body>
|
359
|
+
</html>
|
360
|
+
|