bovem 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Bovem.html +1 -1
- data/doc/Bovem/Configuration.html +1 -1
- data/doc/Bovem/Console.html +243 -43
- data/doc/Bovem/ConsoleMethods.html +1 -1
- data/doc/Bovem/ConsoleMethods/Interactions.html +1 -1
- data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +1 -1
- data/doc/Bovem/ConsoleMethods/Logging.html +1 -1
- data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +1 -1
- data/doc/Bovem/ConsoleMethods/Output.html +1 -1
- data/doc/Bovem/ConsoleMethods/StyleHandling.html +1 -1
- data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +1 -1
- data/doc/Bovem/Errors.html +1 -1
- data/doc/Bovem/Errors/InvalidConfiguration.html +1 -1
- data/doc/Bovem/Errors/InvalidLogger.html +1 -1
- data/doc/Bovem/Logger.html +232 -140
- data/doc/Bovem/Shell.html +56 -16
- data/doc/Bovem/ShellMethods.html +1 -1
- data/doc/Bovem/ShellMethods/Directories.html +1 -1
- data/doc/Bovem/ShellMethods/Execute.html +1 -1
- data/doc/Bovem/ShellMethods/General.html +1 -1
- data/doc/Bovem/ShellMethods/Read.html +1 -1
- data/doc/Bovem/ShellMethods/Write.html +1 -1
- data/doc/Bovem/Version.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +18 -26
- data/doc/top-level-namespace.html +1 -1
- data/lib/bovem/console.rb +8 -4
- data/lib/bovem/logger.rb +8 -3
- data/lib/bovem/shell.rb +2 -1
- data/lib/bovem/version.rb +1 -1
- metadata +1 -1
@@ -265,7 +265,7 @@
|
|
265
265
|
</div>
|
266
266
|
|
267
267
|
<div id="footer">
|
268
|
-
Generated on
|
268
|
+
Generated on Sat Feb 2 09:25:37 2013 by
|
269
269
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
270
270
|
0.8.3 (ruby-1.9.3).
|
271
271
|
</div>
|
@@ -644,7 +644,7 @@ Supported styles and colors are those in <span class='object_link'><a href="../.
|
|
644
644
|
</div>
|
645
645
|
|
646
646
|
<div id="footer">
|
647
|
-
Generated on
|
647
|
+
Generated on Sat Feb 2 09:25:37 2013 by
|
648
648
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
649
649
|
0.8.3 (ruby-1.9.3).
|
650
650
|
</div>
|
data/doc/Bovem/Errors.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sat Feb 2 09:25:37 2013 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.3 (ruby-1.9.3).
|
122
122
|
</div>
|
@@ -124,7 +124,7 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Sat Feb 2 09:25:38 2013 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
129
|
0.8.3 (ruby-1.9.3).
|
130
130
|
</div>
|
@@ -124,7 +124,7 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Sat Feb 2 09:25:38 2013 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
129
|
0.8.3 (ruby-1.9.3).
|
130
130
|
</div>
|
data/doc/Bovem/Logger.html
CHANGED
@@ -115,13 +115,13 @@
|
|
115
115
|
|
116
116
|
|
117
117
|
|
118
|
-
<h2>
|
118
|
+
<h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
119
119
|
<ul class="summary">
|
120
120
|
|
121
121
|
<li class="public ">
|
122
122
|
<span class="summary_signature">
|
123
123
|
|
124
|
-
<a href="#
|
124
|
+
<a href="#start_time-class_method" title="start_time (class method)">+ (Time) <strong>start_time</strong> </a>
|
125
125
|
|
126
126
|
|
127
127
|
|
@@ -138,16 +138,21 @@
|
|
138
138
|
|
139
139
|
|
140
140
|
|
141
|
-
<span class="summary_desc"><div class='inline'><p>The
|
141
|
+
<span class="summary_desc"><div class='inline'><p>The log time of the first logger.</p>
|
142
142
|
</div></span>
|
143
143
|
|
144
144
|
</li>
|
145
145
|
|
146
146
|
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
150
|
+
<ul class="summary">
|
151
|
+
|
147
152
|
<li class="public ">
|
148
153
|
<span class="summary_signature">
|
149
154
|
|
150
|
-
<a href="#
|
155
|
+
<a href="#device-instance_method" title="#device (instance method)">- (IO|String) <strong>device</strong> </a>
|
151
156
|
|
152
157
|
|
153
158
|
|
@@ -156,6 +161,8 @@
|
|
156
161
|
|
157
162
|
|
158
163
|
|
164
|
+
<span class="note title readonly">readonly</span>
|
165
|
+
|
159
166
|
|
160
167
|
|
161
168
|
|
@@ -164,7 +171,7 @@
|
|
164
171
|
|
165
172
|
|
166
173
|
|
167
|
-
<span class="summary_desc"><div class='inline'><p>The
|
174
|
+
<span class="summary_desc"><div class='inline'><p>The file or device to log messages to.</p>
|
168
175
|
</div></span>
|
169
176
|
|
170
177
|
</li>
|
@@ -272,29 +279,6 @@
|
|
272
279
|
<span class="summary_desc"><div class='inline'><p>Translates a file to standard input or standard ouput in some special cases.</p>
|
273
280
|
</div></span>
|
274
281
|
|
275
|
-
</li>
|
276
|
-
|
277
|
-
|
278
|
-
<li class="public ">
|
279
|
-
<span class="summary_signature">
|
280
|
-
|
281
|
-
<a href="#start_time-class_method" title="start_time (class method)">+ (Time) <strong>start_time</strong> </a>
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
</span>
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
<span class="summary_desc"><div class='inline'><p>The log time of the first logger.</p>
|
296
|
-
</div></span>
|
297
|
-
|
298
282
|
</li>
|
299
283
|
|
300
284
|
|
@@ -424,13 +408,13 @@
|
|
424
408
|
<pre class="lines">
|
425
409
|
|
426
410
|
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
411
|
+
28
|
412
|
+
29
|
413
|
+
30
|
414
|
+
31</pre>
|
431
415
|
</td>
|
432
416
|
<td>
|
433
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
417
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 28</span>
|
434
418
|
|
435
419
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_logdev'>logdev</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_age'>shift_age</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_size'>shift_size</span> <span class='op'>=</span> <span class='int'>1048576</span><span class='rparen'>)</span>
|
436
420
|
<span class='ivar'>@device</span> <span class='op'>=</span> <span class='id identifier rubyid_logdev'>logdev</span>
|
@@ -443,15 +427,15 @@
|
|
443
427
|
|
444
428
|
</div>
|
445
429
|
|
446
|
-
<div id="
|
447
|
-
<h2>
|
430
|
+
<div id="class_attr_details" class="attr_details">
|
431
|
+
<h2>Class Attribute Details</h2>
|
448
432
|
|
449
433
|
|
450
|
-
<span id="
|
434
|
+
<span id="start_time=-class_method"></span>
|
451
435
|
<div class="method_details first">
|
452
|
-
<h3 class="signature first" id="
|
436
|
+
<h3 class="signature first" id="start_time-class_method">
|
453
437
|
|
454
|
-
|
438
|
+
+ (<tt>Time</tt>) <strong>start_time</strong>
|
455
439
|
|
456
440
|
|
457
441
|
|
@@ -459,7 +443,7 @@
|
|
459
443
|
|
460
444
|
</h3><div class="docstring">
|
461
445
|
<div class="discussion">
|
462
|
-
<p>The
|
446
|
+
<p>The log time of the first logger. This allows to show a <code>T+0.1234</code> information into the log.</p>
|
463
447
|
|
464
448
|
|
465
449
|
</div>
|
@@ -472,12 +456,12 @@
|
|
472
456
|
<li>
|
473
457
|
|
474
458
|
|
475
|
-
<span class='type'>(<tt>
|
459
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
476
460
|
|
477
461
|
|
478
462
|
|
479
463
|
—
|
480
|
-
<div class='inline'><p>
|
464
|
+
<div class='inline'><p>The log time of the first logger.</p>
|
481
465
|
</div>
|
482
466
|
|
483
467
|
</li>
|
@@ -490,27 +474,32 @@
|
|
490
474
|
<pre class="lines">
|
491
475
|
|
492
476
|
|
493
|
-
|
494
|
-
|
495
|
-
|
477
|
+
91
|
478
|
+
92
|
479
|
+
93</pre>
|
496
480
|
</td>
|
497
481
|
<td>
|
498
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
482
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 91</span>
|
499
483
|
|
500
|
-
<span class='kw'>def</span> <span class='id identifier
|
501
|
-
<span class='ivar'>@
|
484
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_time'>start_time</span>
|
485
|
+
<span class='ivar'>@start_time</span>
|
502
486
|
<span class='kw'>end</span></pre>
|
503
487
|
</td>
|
504
488
|
</tr>
|
505
489
|
</table>
|
506
490
|
</div>
|
507
491
|
|
492
|
+
</div>
|
493
|
+
|
494
|
+
<div id="instance_attr_details" class="attr_details">
|
495
|
+
<h2>Instance Attribute Details</h2>
|
496
|
+
|
508
497
|
|
509
|
-
<span id="
|
510
|
-
<div class="method_details ">
|
511
|
-
<h3 class="signature " id="
|
498
|
+
<span id=""></span>
|
499
|
+
<div class="method_details first">
|
500
|
+
<h3 class="signature first" id="device-instance_method">
|
512
501
|
|
513
|
-
- (<tt>
|
502
|
+
- (<tt>IO|String</tt>) <strong>device</strong> <span class="extras">(readonly)</span>
|
514
503
|
|
515
504
|
|
516
505
|
|
@@ -518,7 +507,7 @@
|
|
518
507
|
|
519
508
|
</h3><div class="docstring">
|
520
509
|
<div class="discussion">
|
521
|
-
<p>The
|
510
|
+
<p>The file or device to log messages to.</p>
|
522
511
|
|
523
512
|
|
524
513
|
</div>
|
@@ -531,12 +520,12 @@
|
|
531
520
|
<li>
|
532
521
|
|
533
522
|
|
534
|
-
<span class='type'>(<tt>
|
523
|
+
<span class='type'>(<tt>IO|String</tt>)</span>
|
535
524
|
|
536
525
|
|
537
526
|
|
538
527
|
—
|
539
|
-
<div class='inline'><p>
|
528
|
+
<div class='inline'><p>The file or device to log messages to.</p>
|
540
529
|
</div>
|
541
530
|
|
542
531
|
</li>
|
@@ -551,13 +540,173 @@
|
|
551
540
|
|
552
541
|
12
|
553
542
|
13
|
554
|
-
14
|
543
|
+
14
|
544
|
+
15
|
545
|
+
16
|
546
|
+
17
|
547
|
+
18
|
548
|
+
19
|
549
|
+
20
|
550
|
+
21
|
551
|
+
22
|
552
|
+
23
|
553
|
+
24
|
554
|
+
25
|
555
|
+
26
|
556
|
+
27
|
557
|
+
28
|
558
|
+
29
|
559
|
+
30
|
560
|
+
31
|
561
|
+
32
|
562
|
+
33
|
563
|
+
34
|
564
|
+
35
|
565
|
+
36
|
566
|
+
37
|
567
|
+
38
|
568
|
+
39
|
569
|
+
40
|
570
|
+
41
|
571
|
+
42
|
572
|
+
43
|
573
|
+
44
|
574
|
+
45
|
575
|
+
46
|
576
|
+
47
|
577
|
+
48
|
578
|
+
49
|
579
|
+
50
|
580
|
+
51
|
581
|
+
52
|
582
|
+
53
|
583
|
+
54
|
584
|
+
55
|
585
|
+
56
|
586
|
+
57
|
587
|
+
58
|
588
|
+
59
|
589
|
+
60
|
590
|
+
61
|
591
|
+
62
|
592
|
+
63
|
593
|
+
64
|
594
|
+
65
|
595
|
+
66
|
596
|
+
67
|
597
|
+
68
|
598
|
+
69
|
599
|
+
70
|
600
|
+
71
|
601
|
+
72
|
602
|
+
73
|
603
|
+
74
|
604
|
+
75
|
605
|
+
76
|
606
|
+
77
|
607
|
+
78
|
608
|
+
79
|
609
|
+
80
|
610
|
+
81
|
611
|
+
82
|
612
|
+
83
|
613
|
+
84
|
614
|
+
85
|
615
|
+
86
|
616
|
+
87
|
617
|
+
88
|
618
|
+
89
|
619
|
+
90
|
620
|
+
91
|
621
|
+
92
|
622
|
+
93
|
623
|
+
94</pre>
|
555
624
|
</td>
|
556
625
|
<td>
|
557
626
|
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 12</span>
|
558
627
|
|
559
|
-
<span class='kw'>
|
560
|
-
<span class='
|
628
|
+
<span class='kw'>class</span> <span class='const'>Logger</span> <span class='op'><</span> <span class='op'>::</span><span class='const'>Logger</span>
|
629
|
+
<span class='comment'># @attribute start_time
|
630
|
+
</span> <span class='comment'># @return [Time] The start time of first line. This allows to show a `T+0.1234` information into the log.
|
631
|
+
</span> <span class='kw'>class</span> <span class='op'><<</span> <span class='kw'>self</span>
|
632
|
+
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:start_time</span>
|
633
|
+
<span class='kw'>end</span>
|
634
|
+
|
635
|
+
<span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:device</span>
|
636
|
+
|
637
|
+
<span class='comment'># Creates a new logger.
|
638
|
+
</span> <span class='comment'>#
|
639
|
+
</span> <span class='comment'># @see http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html
|
640
|
+
</span> <span class='comment'>#
|
641
|
+
</span> <span class='comment'># @param logdev [String|IO] The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file).
|
642
|
+
</span> <span class='comment'># @param shift_age [Fixnum] Number of old log files to keep, or frequency of rotation (daily, weekly or monthly).
|
643
|
+
</span> <span class='comment'># @param shift_size [Fixnum] Maximum logfile size (only applies when shift_age is a number).
|
644
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_logdev'>logdev</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_age'>shift_age</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_size'>shift_size</span> <span class='op'>=</span> <span class='int'>1048576</span><span class='rparen'>)</span>
|
645
|
+
<span class='ivar'>@device</span> <span class='op'>=</span> <span class='id identifier rubyid_logdev'>logdev</span>
|
646
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_logdev'>logdev</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_age'>shift_age</span><span class='comma'>,</span> <span class='id identifier rubyid_shift_size'>shift_size</span><span class='rparen'>)</span>
|
647
|
+
<span class='kw'>end</span>
|
648
|
+
|
649
|
+
<span class='comment'># Creates a new logger.
|
650
|
+
</span> <span class='comment'>#
|
651
|
+
</span> <span class='comment'># @param file [String|IO] The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file).
|
652
|
+
</span> <span class='comment'># @param level [Fixnum] The minimum severity to log. See http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html for valid levels.
|
653
|
+
</span> <span class='comment'># @param formatter [Proc] The formatter to use for logging.
|
654
|
+
</span> <span class='comment'># @return [Logger] The new logger.
|
655
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='op'>::</span><span class='const'>INFO</span><span class='comma'>,</span> <span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
656
|
+
<span class='id identifier rubyid_file'>file</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span>
|
657
|
+
|
658
|
+
<span class='kw'>begin</span>
|
659
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_real_file'>get_real_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
660
|
+
<span class='kw'>rescue</span>
|
661
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>InvalidLogger</span>
|
662
|
+
<span class='kw'>end</span>
|
663
|
+
|
664
|
+
<span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='id identifier rubyid_level'>level</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
665
|
+
<span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_formatter'>default_formatter</span>
|
666
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
667
|
+
<span class='kw'>end</span>
|
668
|
+
|
669
|
+
<span class='comment'># Translates a file to standard input or standard ouput in some special cases.
|
670
|
+
</span> <span class='comment'>#
|
671
|
+
</span> <span class='comment'># @param file [String] The string to translate.
|
672
|
+
</span> <span class='comment'># @return [String|IO] The translated file name.
|
673
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_real_file'>get_real_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
674
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_file'>file</span>
|
675
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stdout</span>
|
676
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stderr</span>
|
677
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_file'>file</span>
|
678
|
+
<span class='kw'>end</span>
|
679
|
+
<span class='kw'>end</span>
|
680
|
+
|
681
|
+
<span class='comment'># The default file for logging.
|
682
|
+
</span> <span class='comment'># @return [String|IO] The default file for logging.
|
683
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span>
|
684
|
+
<span class='ivar'>@default_file</span> <span class='op'>||=</span> <span class='gvar'>$stdout</span>
|
685
|
+
<span class='kw'>end</span>
|
686
|
+
|
687
|
+
<span class='comment'># The default formatter for logging.
|
688
|
+
</span> <span class='comment'># @return [Proc] The default formatter for logging.
|
689
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_formatter'>default_formatter</span>
|
690
|
+
<span class='ivar'>@default_formatter</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_datetime'>datetime</span><span class='comma'>,</span> <span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='op'>|</span>
|
691
|
+
<span class='id identifier rubyid_color'>color</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='id identifier rubyid_severity'>severity</span>
|
692
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DEBUG</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='symbol'>:cyan</span>
|
693
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>INFO</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='symbol'>:green</span>
|
694
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>WARN</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='symbol'>:yellow</span>
|
695
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ERROR</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='symbol'>:red</span>
|
696
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FATAL</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='symbol'>:magenta</span>
|
697
|
+
<span class='kw'>else</span> <span class='symbol'>:white</span>
|
698
|
+
<span class='kw'>end</span>
|
699
|
+
|
700
|
+
<span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{mark=bright-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_color'>color</span><span class='rbrace'>}</span><span class='tstring_content'>}[%s T+%0.5f] %s:{/mark}</span><span class='tstring_end'>"</span></span> <span class='op'>%</span><span class='lbracket'>[</span><span class='id identifier rubyid_datetime'>datetime</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%Y/%b/%d %H:%M:%S</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_datetime'>datetime</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='id identifier rubyid_severity'>severity</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
701
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%s %s\n</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id identifier rubyid_header'>header</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='rbracket'>]</span>
|
702
|
+
<span class='rbrace'>}</span>
|
703
|
+
<span class='kw'>end</span>
|
704
|
+
|
705
|
+
<span class='comment'># The log time of the first logger. This allows to show a `T+0.1234` information into the log.
|
706
|
+
</span> <span class='comment'># @return [Time] The log time of the first logger.
|
707
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span>
|
708
|
+
<span class='ivar'>@start_time</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
709
|
+
<span class='kw'>end</span>
|
561
710
|
<span class='kw'>end</span></pre>
|
562
711
|
</td>
|
563
712
|
</tr>
|
@@ -668,11 +817,6 @@
|
|
668
817
|
<pre class="lines">
|
669
818
|
|
670
819
|
|
671
|
-
34
|
672
|
-
35
|
673
|
-
36
|
674
|
-
37
|
675
|
-
38
|
676
820
|
39
|
677
821
|
40
|
678
822
|
41
|
@@ -680,10 +824,15 @@
|
|
680
824
|
43
|
681
825
|
44
|
682
826
|
45
|
683
|
-
46
|
827
|
+
46
|
828
|
+
47
|
829
|
+
48
|
830
|
+
49
|
831
|
+
50
|
832
|
+
51</pre>
|
684
833
|
</td>
|
685
834
|
<td>
|
686
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
835
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 39</span>
|
687
836
|
|
688
837
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='op'>::</span><span class='const'>INFO</span><span class='comma'>,</span> <span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
689
838
|
<span class='id identifier rubyid_file'>file</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span>
|
@@ -745,12 +894,12 @@
|
|
745
894
|
<pre class="lines">
|
746
895
|
|
747
896
|
|
748
|
-
|
749
|
-
|
750
|
-
|
897
|
+
67
|
898
|
+
68
|
899
|
+
69</pre>
|
751
900
|
</td>
|
752
901
|
<td>
|
753
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
902
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 67</span>
|
754
903
|
|
755
904
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span>
|
756
905
|
<span class='ivar'>@default_file</span> <span class='op'>||=</span> <span class='gvar'>$stdout</span>
|
@@ -802,11 +951,6 @@
|
|
802
951
|
<pre class="lines">
|
803
952
|
|
804
953
|
|
805
|
-
68
|
806
|
-
69
|
807
|
-
70
|
808
|
-
71
|
809
|
-
72
|
810
954
|
73
|
811
955
|
74
|
812
956
|
75
|
@@ -816,10 +960,15 @@
|
|
816
960
|
79
|
817
961
|
80
|
818
962
|
81
|
819
|
-
82
|
963
|
+
82
|
964
|
+
83
|
965
|
+
84
|
966
|
+
85
|
967
|
+
86
|
968
|
+
87</pre>
|
820
969
|
</td>
|
821
970
|
<td>
|
822
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
971
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 73</span>
|
823
972
|
|
824
973
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_formatter'>default_formatter</span>
|
825
974
|
<span class='ivar'>@default_formatter</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_datetime'>datetime</span><span class='comma'>,</span> <span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='op'>|</span>
|
@@ -902,16 +1051,16 @@
|
|
902
1051
|
<pre class="lines">
|
903
1052
|
|
904
1053
|
|
905
|
-
52
|
906
|
-
53
|
907
|
-
54
|
908
|
-
55
|
909
|
-
56
|
910
1054
|
57
|
911
|
-
58
|
1055
|
+
58
|
1056
|
+
59
|
1057
|
+
60
|
1058
|
+
61
|
1059
|
+
62
|
1060
|
+
63</pre>
|
912
1061
|
</td>
|
913
1062
|
<td>
|
914
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line
|
1063
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 57</span>
|
915
1064
|
|
916
1065
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_real_file'>get_real_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
917
1066
|
<span class='kw'>case</span> <span class='id identifier rubyid_file'>file</span>
|
@@ -923,63 +1072,6 @@
|
|
923
1072
|
</td>
|
924
1073
|
</tr>
|
925
1074
|
</table>
|
926
|
-
</div>
|
927
|
-
|
928
|
-
<div class="method_details ">
|
929
|
-
<h3 class="signature " id="start_time-class_method">
|
930
|
-
|
931
|
-
+ (<tt>Time</tt>) <strong>start_time</strong>
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
</h3><div class="docstring">
|
938
|
-
<div class="discussion">
|
939
|
-
<p>The log time of the first logger. This allows to show a <code>T+0.1234</code> information into the log.</p>
|
940
|
-
|
941
|
-
|
942
|
-
</div>
|
943
|
-
</div>
|
944
|
-
<div class="tags">
|
945
|
-
|
946
|
-
<p class="tag_title">Returns:</p>
|
947
|
-
<ul class="return">
|
948
|
-
|
949
|
-
<li>
|
950
|
-
|
951
|
-
|
952
|
-
<span class='type'>(<tt>Time</tt>)</span>
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
—
|
957
|
-
<div class='inline'><p>The log time of the first logger.</p>
|
958
|
-
</div>
|
959
|
-
|
960
|
-
</li>
|
961
|
-
|
962
|
-
</ul>
|
963
|
-
|
964
|
-
</div><table class="source_code">
|
965
|
-
<tr>
|
966
|
-
<td>
|
967
|
-
<pre class="lines">
|
968
|
-
|
969
|
-
|
970
|
-
86
|
971
|
-
87
|
972
|
-
88</pre>
|
973
|
-
</td>
|
974
|
-
<td>
|
975
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 86</span>
|
976
|
-
|
977
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span>
|
978
|
-
<span class='ivar'>@start_time</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
979
|
-
<span class='kw'>end</span></pre>
|
980
|
-
</td>
|
981
|
-
</tr>
|
982
|
-
</table>
|
983
1075
|
</div>
|
984
1076
|
|
985
1077
|
</div>
|
@@ -987,7 +1079,7 @@
|
|
987
1079
|
</div>
|
988
1080
|
|
989
1081
|
<div id="footer">
|
990
|
-
Generated on
|
1082
|
+
Generated on Sat Feb 2 09:25:38 2013 by
|
991
1083
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
992
1084
|
0.8.3 (ruby-1.9.3).
|
993
1085
|
</div>
|