vizi_translator 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +56 -54
- data/README.rdoc.old +56 -0
- data/doc/classes/Vizi/Translator.html +200 -0
- data/doc/classes/Vizi/Translator.src/M000002.html +18 -0
- data/doc/classes/Vizi/Translator.src/M000003.html +18 -0
- data/doc/classes/Vizi/Translator.src/M000004.html +40 -0
- data/doc/classes/Vizi/UnSupportedLanguage.html +150 -0
- data/doc/classes/Vizi/UnSupportedLanguage.src/M000001.html +18 -0
- data/doc/classes/Vizi.html +122 -0
- data/doc/created.rid +1 -4
- data/doc/files/lib/vizi/vizi_translator_rb.html +126 -0
- data/doc/files/lib/vizi_translator_rb.html +114 -0
- data/doc/files/testit_rb.html +127 -0
- data/doc/fr_class_index.html +29 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +30 -0
- data/doc/index.html +24 -68
- data/doc/rdoc-style.css +208 -0
- data/testit.rb +2 -2
- data/vizi_translator-0.2.0.gem +0 -0
- data/vizi_translator.gemspec +1 -1
- metadata +20 -60
- data/doc/Object.html +0 -200
- data/doc/ParserTest.html +0 -268
- data/doc/README_rdoc.html +0 -128
- data/doc/Rakefile.html +0 -148
- data/doc/Visit.html +0 -487
- data/doc/VisitList.html +0 -385
- data/doc/Vizi/LogFormat.html +0 -377
- data/doc/Vizi/LogParser.html +0 -551
- data/doc/Vizi/Translator.html +0 -302
- data/doc/Vizi/UnSupportedLanguage.html +0 -212
- data/doc/Vizi/Visit.html +0 -487
- data/doc/Vizi/VisitList.html +0 -386
- data/doc/Vizi.html +0 -159
- data/doc/ViziLogFormat.html +0 -382
- data/doc/ViziLogParser.html +0 -551
- data/doc/docs/Whois_Documentation.doc +0 -0
- data/doc/formats/apache-custom-log.pdf +0 -0
- data/doc/formats/apache.rtf +0 -238
- data/doc/formats/format-descriptions.xls +0 -0
- data/doc/formats/w3c-extended.pdf +0 -0
- data/doc/formats/w3c-extended.rtf +0 -135
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/js/darkfish.js +0 -116
- data/doc/js/jquery.js +0 -32
- data/doc/js/quicksearch.js +0 -114
- data/doc/js/thickbox-compressed.js +0 -10
- data/doc/lib/vizi/parser_rb.html +0 -63
- data/doc/lib/vizi/vizi_tracker_rb.html +0 -63
- data/doc/lib/vizi/vizi_translator.html +0 -104
- data/doc/lib/vizi/vizi_translator_rb.html +0 -69
- data/doc/lib/vizi_log_parser_rb.html +0 -56
- data/doc/lib/vizi_tracker_rb.html +0 -56
- data/doc/lib/vizi_translator_rb.html +0 -54
- data/doc/rdoc.css +0 -759
- data/doc/test/parser_test_rb.html +0 -54
- data/doc/test/test_helper_rb.html +0 -56
- data/doc/testit_rb.html +0 -63
data/doc/Vizi/LogFormat.html
DELETED
@@ -1,377 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="IBM437"?>
|
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=IBM437" http-equiv="Content-Type" />
|
7
|
-
|
8
|
-
<title>Class: Vizi::LogFormat</title>
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
-
|
12
|
-
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
-
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
-
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
-
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body id="top" class="class">
|
19
|
-
|
20
|
-
<div id="metadata">
|
21
|
-
<div id="home-metadata">
|
22
|
-
<div id="home-section" class="section">
|
23
|
-
<h3 class="section-header">
|
24
|
-
<a href="../index.html">Home</a>
|
25
|
-
<a href="../index.html#classes">Classes</a>
|
26
|
-
<a href="../index.html#methods">Methods</a>
|
27
|
-
</h3>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div id="file-metadata">
|
32
|
-
<div id="file-list-section" class="section">
|
33
|
-
<h3 class="section-header">In Files</h3>
|
34
|
-
<div class="section-body">
|
35
|
-
<ul>
|
36
|
-
|
37
|
-
<li><a href="../lib/vizi/vizi_tracker_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
-
class="thickbox" title="lib/vizi/vizi_tracker.rb">lib/vizi/vizi_tracker.rb</a></li>
|
39
|
-
|
40
|
-
</ul>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div id="class-metadata">
|
48
|
-
|
49
|
-
<!-- Parent Class -->
|
50
|
-
<div id="parent-class-section" class="section">
|
51
|
-
<h3 class="section-header">Parent</h3>
|
52
|
-
|
53
|
-
<p class="link"><a href="../Object.html">Object</a></p>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
<!-- Method Quickref -->
|
64
|
-
<div id="method-list-section" class="section">
|
65
|
-
<h3 class="section-header">Methods</h3>
|
66
|
-
<ul class="link-list">
|
67
|
-
|
68
|
-
<li><a href="#method-c-new">::new</a></li>
|
69
|
-
|
70
|
-
<li><a href="#method-i-parse_format">#parse_format</a></li>
|
71
|
-
|
72
|
-
<li><a href="#method-i-process_directive">#process_directive</a></li>
|
73
|
-
|
74
|
-
</ul>
|
75
|
-
</div>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
<div id="project-metadata">
|
82
|
-
|
83
|
-
|
84
|
-
<div id="fileindex-section" class="section project-section">
|
85
|
-
<h3 class="section-header">Files</h3>
|
86
|
-
<ul>
|
87
|
-
|
88
|
-
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
89
|
-
|
90
|
-
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
91
|
-
|
92
|
-
</ul>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
<div id="classindex-section" class="section project-section">
|
97
|
-
<h3 class="section-header">Class/Module Index
|
98
|
-
<span class="search-toggle"><img src="../images/find.png"
|
99
|
-
height="16" width="16" alt="[+]"
|
100
|
-
title="show/hide quicksearch" /></span></h3>
|
101
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
102
|
-
<fieldset>
|
103
|
-
<legend>Quicksearch</legend>
|
104
|
-
<input type="text" name="quicksearch" value=""
|
105
|
-
class="quicksearch-field" />
|
106
|
-
</fieldset>
|
107
|
-
</form>
|
108
|
-
|
109
|
-
<ul class="link-list">
|
110
|
-
|
111
|
-
<li><a href="../Vizi.html">Vizi</a></li>
|
112
|
-
|
113
|
-
<li><a href="../Vizi/LogFormat.html">Vizi::LogFormat</a></li>
|
114
|
-
|
115
|
-
<li><a href="../Vizi/LogParser.html">Vizi::LogParser</a></li>
|
116
|
-
|
117
|
-
<li><a href="../Vizi/Visit.html">Vizi::Visit</a></li>
|
118
|
-
|
119
|
-
<li><a href="../Vizi/VisitList.html">Vizi::VisitList</a></li>
|
120
|
-
|
121
|
-
<li><a href="../Object.html">Object</a></li>
|
122
|
-
|
123
|
-
<li><a href="../ParserTest.html">ParserTest</a></li>
|
124
|
-
|
125
|
-
</ul>
|
126
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
127
|
-
</div>
|
128
|
-
|
129
|
-
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
|
133
|
-
<div id="documentation">
|
134
|
-
<h1 class="class">Vizi::LogFormat</h1>
|
135
|
-
|
136
|
-
<div id="description" class="description">
|
137
|
-
|
138
|
-
<p>This class handles the parsing of each line in the log file</p>
|
139
|
-
|
140
|
-
</div><!-- description -->
|
141
|
-
|
142
|
-
|
143
|
-
<div id="5Buntitled-5D" class="documentation-section">
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
<!-- Constants -->
|
150
|
-
<div id="constants-list" class="section">
|
151
|
-
<h3 class="section-header">Constants</h3>
|
152
|
-
<dl>
|
153
|
-
|
154
|
-
<dt><a name="DIRECTIVES">DIRECTIVES</a></dt>
|
155
|
-
|
156
|
-
<dd class="description"><p>add more format directives here..</p></dd>
|
157
|
-
|
158
|
-
|
159
|
-
</dl>
|
160
|
-
</div>
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<!-- Attributes -->
|
165
|
-
<div id="attribute-method-details" class="method-section section">
|
166
|
-
<h3 class="section-header">Attributes</h3>
|
167
|
-
|
168
|
-
|
169
|
-
<div id="format-attribute-method" class="method-detail">
|
170
|
-
<a name="format"></a>
|
171
|
-
|
172
|
-
<div class="method-heading attribute-method-heading">
|
173
|
-
<span class="method-name">format</span><span
|
174
|
-
class="attribute-access-type">[R]</span>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div class="method-description">
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
</div>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
<div id="format_regex-attribute-method" class="method-detail">
|
185
|
-
<a name="format_regex"></a>
|
186
|
-
|
187
|
-
<div class="method-heading attribute-method-heading">
|
188
|
-
<span class="method-name">format_regex</span><span
|
189
|
-
class="attribute-access-type">[R]</span>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
<div class="method-description">
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
</div>
|
197
|
-
</div>
|
198
|
-
|
199
|
-
<div id="format_symbols-attribute-method" class="method-detail">
|
200
|
-
<a name="format_symbols"></a>
|
201
|
-
|
202
|
-
<div class="method-heading attribute-method-heading">
|
203
|
-
<span class="method-name">format_symbols</span><span
|
204
|
-
class="attribute-access-type">[R]</span>
|
205
|
-
</div>
|
206
|
-
|
207
|
-
<div class="method-description">
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div id="name-attribute-method" class="method-detail">
|
215
|
-
<a name="name"></a>
|
216
|
-
|
217
|
-
<div class="method-heading attribute-method-heading">
|
218
|
-
<span class="method-name">name</span><span
|
219
|
-
class="attribute-access-type">[R]</span>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div class="method-description">
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
</div>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
</div><!-- attribute-method-details -->
|
230
|
-
|
231
|
-
|
232
|
-
<!-- Methods -->
|
233
|
-
|
234
|
-
<div id="public-class-method-details" class="method-section section">
|
235
|
-
<h3 class="section-header">Public Class Methods</h3>
|
236
|
-
|
237
|
-
|
238
|
-
<div id="new-method" class="method-detail ">
|
239
|
-
<a name="method-c-new"></a>
|
240
|
-
|
241
|
-
|
242
|
-
<div class="method-heading">
|
243
|
-
<span class="method-name">new</span><span
|
244
|
-
class="method-args">(name, format)</span>
|
245
|
-
<span class="method-click-advice">click to toggle source</span>
|
246
|
-
</div>
|
247
|
-
|
248
|
-
|
249
|
-
<div class="method-description">
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
<div class="method-source-code" id="new-source">
|
256
|
-
<pre>
|
257
|
-
<span class="ruby-comment"># File lib/vizi/vizi_tracker.rb, line 43</span>
|
258
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">format</span>)
|
259
|
-
<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@format</span> = <span class="ruby-identifier">name</span>, <span class="ruby-identifier">format</span>
|
260
|
-
<span class="ruby-identifier">parse_format</span>(<span class="ruby-identifier">format</span>)
|
261
|
-
<span class="ruby-keyword">end</span></pre>
|
262
|
-
</div><!-- new-source -->
|
263
|
-
|
264
|
-
</div>
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
</div><!-- new-method -->
|
270
|
-
|
271
|
-
|
272
|
-
</div><!-- public-class-method-details -->
|
273
|
-
|
274
|
-
<div id="public-instance-method-details" class="method-section section">
|
275
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
276
|
-
|
277
|
-
|
278
|
-
<div id="parse_format-method" class="method-detail ">
|
279
|
-
<a name="method-i-parse_format"></a>
|
280
|
-
|
281
|
-
|
282
|
-
<div class="method-heading">
|
283
|
-
<span class="method-name">parse_format</span><span
|
284
|
-
class="method-args">(format)</span>
|
285
|
-
<span class="method-click-advice">click to toggle source</span>
|
286
|
-
</div>
|
287
|
-
|
288
|
-
|
289
|
-
<div class="method-description">
|
290
|
-
|
291
|
-
<p>The symbols are used to map the log to the env variables The regex is used
|
292
|
-
when checking what format the log is and to extract data</p>
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
<div class="method-source-code" id="parse_format-source">
|
297
|
-
<pre>
|
298
|
-
<span class="ruby-comment"># File lib/vizi/vizi_tracker.rb, line 50</span>
|
299
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">parse_format</span>(<span class="ruby-identifier">format</span>)
|
300
|
-
<span class="ruby-identifier">format_directive</span> = <span class="ruby-node">/%(.*?)(\{.*?\})?([#{[DIRECTIVES.keys.join('|')]}])([\s\\"]*)/</span>
|
301
|
-
<span class="ruby-identifier">log_format_symbols</span> = []
|
302
|
-
<span class="ruby-identifier">format_regex</span> = <span class="ruby-string">""</span>
|
303
|
-
<span class="ruby-identifier">format</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">format_directive</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">condition</span>, <span class="ruby-identifier">subdirective</span>, <span class="ruby-identifier">directive_char</span>, <span class="ruby-identifier">ignored</span><span class="ruby-operator">|</span>
|
304
|
-
<span class="ruby-identifier">log_format</span>, <span class="ruby-identifier">match_regex</span> = <span class="ruby-identifier">process_directive</span>(<span class="ruby-identifier">directive_char</span>, <span class="ruby-identifier">subdirective</span>, <span class="ruby-identifier">condition</span>)
|
305
|
-
<span class="ruby-identifier">ignored</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">/\s/</span>, <span class="ruby-string">'\s'</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">ignored</span>.<span class="ruby-identifier">nil?</span>
|
306
|
-
<span class="ruby-identifier">log_format_symbols</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">log_format</span>
|
307
|
-
<span class="ruby-identifier">format_regex</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"(#{match_regex})#{ignored}"</span>
|
308
|
-
<span class="ruby-keyword">end</span>
|
309
|
-
<span class="ruby-ivar">@format_symbols</span> = <span class="ruby-identifier">log_format_symbols</span>
|
310
|
-
<span class="ruby-ivar">@format_regex</span> = <span class="ruby-node">/^#{format_regex}/</span>
|
311
|
-
<span class="ruby-keyword">end</span></pre>
|
312
|
-
</div><!-- parse_format-source -->
|
313
|
-
|
314
|
-
</div>
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
</div><!-- parse_format-method -->
|
320
|
-
|
321
|
-
|
322
|
-
<div id="process_directive-method" class="method-detail ">
|
323
|
-
<a name="method-i-process_directive"></a>
|
324
|
-
|
325
|
-
|
326
|
-
<div class="method-heading">
|
327
|
-
<span class="method-name">process_directive</span><span
|
328
|
-
class="method-args">(directive_char, subdirective, condition)</span>
|
329
|
-
<span class="method-click-advice">click to toggle source</span>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
|
333
|
-
<div class="method-description">
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
<div class="method-source-code" id="process_directive-source">
|
340
|
-
<pre>
|
341
|
-
<span class="ruby-comment"># File lib/vizi/vizi_tracker.rb, line 64</span>
|
342
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">process_directive</span>(<span class="ruby-identifier">directive_char</span>, <span class="ruby-identifier">subdirective</span>, <span class="ruby-identifier">condition</span>)
|
343
|
-
<span class="ruby-identifier">directive</span> = <span class="ruby-constant">DIRECTIVES</span>[<span class="ruby-identifier">directive_char</span>]
|
344
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">directive_char</span>
|
345
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">'i'</span>
|
346
|
-
<span class="ruby-identifier">log_format</span> = <span class="ruby-identifier">subdirective</span>[<span class="ruby-value">1</span><span class="ruby-operator">...</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">'-'</span>, <span class="ruby-string">'_'</span>).<span class="ruby-identifier">to_sym</span>
|
347
|
-
[<span class="ruby-identifier">log_format</span>, <span class="ruby-identifier">directive</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">source</span>]
|
348
|
-
<span class="ruby-keyword">else</span>
|
349
|
-
[<span class="ruby-identifier">directive</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">directive</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">source</span>]
|
350
|
-
<span class="ruby-keyword">end</span>
|
351
|
-
<span class="ruby-keyword">end</span></pre>
|
352
|
-
</div><!-- process_directive-source -->
|
353
|
-
|
354
|
-
</div>
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
</div><!-- process_directive-method -->
|
360
|
-
|
361
|
-
|
362
|
-
</div><!-- public-instance-method-details -->
|
363
|
-
|
364
|
-
</div><!-- 5Buntitled-5D -->
|
365
|
-
|
366
|
-
|
367
|
-
</div><!-- documentation -->
|
368
|
-
|
369
|
-
<div id="validator-badges">
|
370
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
371
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
372
|
-
Rdoc Generator</a> 2</small>.</p>
|
373
|
-
</div>
|
374
|
-
|
375
|
-
</body>
|
376
|
-
</html>
|
377
|
-
|