bovem 1.2.3 → 1.2.4
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/doc/Bovem.html +185 -0
- data/doc/Bovem/Configuration.html +598 -0
- data/doc/Bovem/Console.html +4850 -0
- data/doc/Bovem/Errors.html +125 -0
- data/doc/Bovem/Errors/InvalidConfiguration.html +133 -0
- data/doc/Bovem/Errors/InvalidLogger.html +133 -0
- data/doc/Bovem/Logger.html +896 -0
- data/doc/Bovem/Shell.html +2292 -0
- data/doc/Bovem/Version.html +189 -0
- data/doc/_index.html +214 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +105 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +105 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +476 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/bovem/console.rb +1 -1
- data/lib/bovem/version.rb +1 -1
- data/spec/bovem/console_spec.rb +8 -8
- metadata +44 -72
@@ -0,0 +1,125 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Bovem::Errors
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (E)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Errors</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Bovem::Errors
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/bovem/errors.rb</dd>
|
83
|
+
|
84
|
+
</dl>
|
85
|
+
<div class="clear"></div>
|
86
|
+
|
87
|
+
<h2>Overview</h2><div class="docstring">
|
88
|
+
<div class="discussion">
|
89
|
+
<p>Exceptions for <span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span>.</p>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
<div class="tags">
|
95
|
+
|
96
|
+
|
97
|
+
</div><h2>Defined Under Namespace</h2>
|
98
|
+
<p class="children">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Errors/InvalidConfiguration.html" title="Bovem::Errors::InvalidConfiguration (class)">InvalidConfiguration</a></span>, <span class='object_link'><a href="Errors/InvalidLogger.html" title="Bovem::Errors::InvalidLogger (class)">InvalidLogger</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
</p>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div id="footer">
|
119
|
+
Generated on Sun Oct 21 11:18:28 2012 by
|
120
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
+
0.8.2.1 (ruby-1.9.2).
|
122
|
+
</div>
|
123
|
+
|
124
|
+
</body>
|
125
|
+
</html>
|
@@ -0,0 +1,133 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Exception: Bovem::Errors::InvalidConfiguration
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (I)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> » <span class='title'><span class='object_link'><a href="../Errors.html" title="Bovem::Errors (module)">Errors</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">InvalidConfiguration</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Exception: Bovem::Errors::InvalidConfiguration
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">ArgumentError</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">ArgumentError</li>
|
82
|
+
|
83
|
+
<li class="next">Bovem::Errors::InvalidConfiguration</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/bovem/errors.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>This exception is raised if a <span class='object_link'><a href="../Configuration.html" title="Bovem::Configuration (class)">Configuration</a></span> is invalid.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="footer">
|
127
|
+
Generated on Sun Oct 21 11:18:28 2012 by
|
128
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
+
0.8.2.1 (ruby-1.9.2).
|
130
|
+
</div>
|
131
|
+
|
132
|
+
</body>
|
133
|
+
</html>
|
@@ -0,0 +1,133 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Exception: Bovem::Errors::InvalidLogger
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (I)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> » <span class='title'><span class='object_link'><a href="../Errors.html" title="Bovem::Errors (module)">Errors</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">InvalidLogger</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Exception: Bovem::Errors::InvalidLogger
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">ArgumentError</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">ArgumentError</li>
|
82
|
+
|
83
|
+
<li class="next">Bovem::Errors::InvalidLogger</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/bovem/errors.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>This exception is raised if a <span class='object_link'><a href="../Logger.html" title="Bovem::Logger (class)">Logger</a></span> is invalid.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="footer">
|
127
|
+
Generated on Sun Oct 21 11:18:28 2012 by
|
128
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
+
0.8.2.1 (ruby-1.9.2).
|
130
|
+
</div>
|
131
|
+
|
132
|
+
</body>
|
133
|
+
</html>
|
@@ -0,0 +1,896 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Bovem::Logger
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (L)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Logger</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Bovem::Logger
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Logger</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Logger</li>
|
82
|
+
|
83
|
+
<li class="next">Bovem::Logger</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/bovem/logger.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>A custom logger.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#device-instance_method" title="#device (instance method)">- (Object) <strong>device</strong> </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="note title readonly">readonly</span>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<span class="summary_desc"><div class='inline'><p>The file or device to log messages to.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<h2>
|
156
|
+
Class Method Summary
|
157
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
158
|
+
</h2>
|
159
|
+
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#create-class_method" title="create (class method)">+ (Logger) <strong>create</strong>(file = nil, level = Logger::INFO, formatter = nil) </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'><p>Creates a new logger.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
<li class="public ">
|
186
|
+
<span class="summary_signature">
|
187
|
+
|
188
|
+
<a href="#default_file-class_method" title="default_file (class method)">+ (String|IO) <strong>default_file</strong> </a>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</span>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'><p>The default file for logging.</p>
|
203
|
+
</div></span>
|
204
|
+
|
205
|
+
</li>
|
206
|
+
|
207
|
+
|
208
|
+
<li class="public ">
|
209
|
+
<span class="summary_signature">
|
210
|
+
|
211
|
+
<a href="#default_formatter-class_method" title="default_formatter (class method)">+ (Proc) <strong>default_formatter</strong> </a>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
</span>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
<span class="summary_desc"><div class='inline'><p>The default formatter for logging.</p>
|
226
|
+
</div></span>
|
227
|
+
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="public ">
|
232
|
+
<span class="summary_signature">
|
233
|
+
|
234
|
+
<a href="#get_real_file-class_method" title="get_real_file (class method)">+ (String|IO) <strong>get_real_file</strong>(file) </a>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</span>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<span class="summary_desc"><div class='inline'><p>Translates a file to standard input or standard ouput in some special cases.</p>
|
249
|
+
</div></span>
|
250
|
+
|
251
|
+
</li>
|
252
|
+
|
253
|
+
|
254
|
+
<li class="public ">
|
255
|
+
<span class="summary_signature">
|
256
|
+
|
257
|
+
<a href="#start_time-class_method" title="start_time (class method)">+ (Time) <strong>start_time</strong> </a>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
</span>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<span class="summary_desc"><div class='inline'><p>The log time of the first logger.</p>
|
272
|
+
</div></span>
|
273
|
+
|
274
|
+
</li>
|
275
|
+
|
276
|
+
|
277
|
+
</ul>
|
278
|
+
|
279
|
+
<h2>
|
280
|
+
Instance Method Summary
|
281
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
282
|
+
</h2>
|
283
|
+
|
284
|
+
<ul class="summary">
|
285
|
+
|
286
|
+
<li class="public ">
|
287
|
+
<span class="summary_signature">
|
288
|
+
|
289
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Logger) <strong>initialize</strong>(logdev, shift_age = 0, shift_size = 1048576) </a>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
</span>
|
294
|
+
|
295
|
+
|
296
|
+
<span class="note title constructor">constructor</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<span class="summary_desc"><div class='inline'><p>Creates a new logger.</p>
|
306
|
+
</div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
</ul>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<div id="constructor_details" class="method_details_list">
|
316
|
+
<h2>Constructor Details</h2>
|
317
|
+
|
318
|
+
<div class="method_details first">
|
319
|
+
<h3 class="signature first" id="initialize-instance_method">
|
320
|
+
|
321
|
+
- (<tt><span class='object_link'><a href="" title="Bovem::Logger (class)">Logger</a></span></tt>) <strong>initialize</strong>(logdev, shift_age = 0, shift_size = 1048576)
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</h3><div class="docstring">
|
328
|
+
<div class="discussion">
|
329
|
+
<p>Creates a new logger.</p>
|
330
|
+
|
331
|
+
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
<div class="tags">
|
335
|
+
<p class="tag_title">Parameters:</p>
|
336
|
+
<ul class="param">
|
337
|
+
|
338
|
+
<li>
|
339
|
+
|
340
|
+
<span class='name'>logdev</span>
|
341
|
+
|
342
|
+
|
343
|
+
<span class='type'>(<tt>String|IO</tt>)</span>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
—
|
348
|
+
<div class='inline'><p>The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file).</p>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
</li>
|
352
|
+
|
353
|
+
<li>
|
354
|
+
|
355
|
+
<span class='name'>shift_age</span>
|
356
|
+
|
357
|
+
|
358
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
359
|
+
|
360
|
+
|
361
|
+
<em class="default">(defaults to: <tt>0</tt>)</em>
|
362
|
+
|
363
|
+
|
364
|
+
—
|
365
|
+
<div class='inline'><p>Number of old log files to keep, or frequency of rotation (daily, weekly or monthly).</p>
|
366
|
+
</div>
|
367
|
+
|
368
|
+
</li>
|
369
|
+
|
370
|
+
<li>
|
371
|
+
|
372
|
+
<span class='name'>shift_size</span>
|
373
|
+
|
374
|
+
|
375
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
376
|
+
|
377
|
+
|
378
|
+
<em class="default">(defaults to: <tt>1048576</tt>)</em>
|
379
|
+
|
380
|
+
|
381
|
+
—
|
382
|
+
<div class='inline'><p>Maximum logfile size (only applies when shift_age is a number).</p>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</li>
|
386
|
+
|
387
|
+
</ul>
|
388
|
+
|
389
|
+
|
390
|
+
<p class="tag_title">See Also:</p>
|
391
|
+
<ul class="see">
|
392
|
+
|
393
|
+
<li><a href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html" target="_parent" title="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html">http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html</a></li>
|
394
|
+
|
395
|
+
</ul>
|
396
|
+
|
397
|
+
</div><table class="source_code">
|
398
|
+
<tr>
|
399
|
+
<td>
|
400
|
+
<pre class="lines">
|
401
|
+
|
402
|
+
|
403
|
+
23
|
404
|
+
24
|
405
|
+
25
|
406
|
+
26</pre>
|
407
|
+
</td>
|
408
|
+
<td>
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 23</span>
|
410
|
+
|
411
|
+
<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>
|
412
|
+
<span class='ivar'>@device</span> <span class='op'>=</span> <span class='id identifier rubyid_logdev'>logdev</span>
|
413
|
+
<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>
|
414
|
+
<span class='kw'>end</span></pre>
|
415
|
+
</td>
|
416
|
+
</tr>
|
417
|
+
</table>
|
418
|
+
</div>
|
419
|
+
|
420
|
+
</div>
|
421
|
+
|
422
|
+
<div id="instance_attr_details" class="attr_details">
|
423
|
+
<h2>Instance Attribute Details</h2>
|
424
|
+
|
425
|
+
|
426
|
+
<span id=""></span>
|
427
|
+
<div class="method_details first">
|
428
|
+
<h3 class="signature first" id="device-instance_method">
|
429
|
+
|
430
|
+
- (<tt>Object</tt>) <strong>device</strong> <span class="extras">(readonly)</span>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
</h3><div class="docstring">
|
437
|
+
<div class="discussion">
|
438
|
+
<p>The file or device to log messages to.</p>
|
439
|
+
|
440
|
+
|
441
|
+
</div>
|
442
|
+
</div>
|
443
|
+
<div class="tags">
|
444
|
+
|
445
|
+
|
446
|
+
</div><table class="source_code">
|
447
|
+
<tr>
|
448
|
+
<td>
|
449
|
+
<pre class="lines">
|
450
|
+
|
451
|
+
|
452
|
+
14
|
453
|
+
15
|
454
|
+
16</pre>
|
455
|
+
</td>
|
456
|
+
<td>
|
457
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 14</span>
|
458
|
+
|
459
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_device'>device</span>
|
460
|
+
<span class='ivar'>@device</span>
|
461
|
+
<span class='kw'>end</span></pre>
|
462
|
+
</td>
|
463
|
+
</tr>
|
464
|
+
</table>
|
465
|
+
</div>
|
466
|
+
|
467
|
+
</div>
|
468
|
+
|
469
|
+
|
470
|
+
<div id="class_method_details" class="method_details_list">
|
471
|
+
<h2>Class Method Details</h2>
|
472
|
+
|
473
|
+
|
474
|
+
<div class="method_details first">
|
475
|
+
<h3 class="signature first" id="create-class_method">
|
476
|
+
|
477
|
+
+ (<tt><span class='object_link'><a href="" title="Bovem::Logger (class)">Logger</a></span></tt>) <strong>create</strong>(file = nil, level = Logger::INFO, formatter = nil)
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
</h3><div class="docstring">
|
484
|
+
<div class="discussion">
|
485
|
+
<p>Creates a new logger.</p>
|
486
|
+
|
487
|
+
|
488
|
+
</div>
|
489
|
+
</div>
|
490
|
+
<div class="tags">
|
491
|
+
<p class="tag_title">Parameters:</p>
|
492
|
+
<ul class="param">
|
493
|
+
|
494
|
+
<li>
|
495
|
+
|
496
|
+
<span class='name'>file</span>
|
497
|
+
|
498
|
+
|
499
|
+
<span class='type'>(<tt>String|IO</tt>)</span>
|
500
|
+
|
501
|
+
|
502
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
503
|
+
|
504
|
+
|
505
|
+
—
|
506
|
+
<div class='inline'><p>The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file).</p>
|
507
|
+
</div>
|
508
|
+
|
509
|
+
</li>
|
510
|
+
|
511
|
+
<li>
|
512
|
+
|
513
|
+
<span class='name'>level</span>
|
514
|
+
|
515
|
+
|
516
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
517
|
+
|
518
|
+
|
519
|
+
<em class="default">(defaults to: <tt>Logger::INFO</tt>)</em>
|
520
|
+
|
521
|
+
|
522
|
+
—
|
523
|
+
<div class='inline'><p>The minimum severity to log. See <a href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html">http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html</a> for valid levels.</p>
|
524
|
+
</div>
|
525
|
+
|
526
|
+
</li>
|
527
|
+
|
528
|
+
<li>
|
529
|
+
|
530
|
+
<span class='name'>formatter</span>
|
531
|
+
|
532
|
+
|
533
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
534
|
+
|
535
|
+
|
536
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
537
|
+
|
538
|
+
|
539
|
+
—
|
540
|
+
<div class='inline'><p>The formatter to use for logging.</p>
|
541
|
+
</div>
|
542
|
+
|
543
|
+
</li>
|
544
|
+
|
545
|
+
</ul>
|
546
|
+
|
547
|
+
<p class="tag_title">Returns:</p>
|
548
|
+
<ul class="return">
|
549
|
+
|
550
|
+
<li>
|
551
|
+
|
552
|
+
|
553
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Bovem::Logger (class)">Logger</a></span></tt>)</span>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
—
|
558
|
+
<div class='inline'><p>The new logger.</p>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
</li>
|
562
|
+
|
563
|
+
</ul>
|
564
|
+
|
565
|
+
</div><table class="source_code">
|
566
|
+
<tr>
|
567
|
+
<td>
|
568
|
+
<pre class="lines">
|
569
|
+
|
570
|
+
|
571
|
+
34
|
572
|
+
35
|
573
|
+
36
|
574
|
+
37
|
575
|
+
38
|
576
|
+
39
|
577
|
+
40
|
578
|
+
41
|
579
|
+
42
|
580
|
+
43
|
581
|
+
44
|
582
|
+
45
|
583
|
+
46</pre>
|
584
|
+
</td>
|
585
|
+
<td>
|
586
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 34</span>
|
587
|
+
|
588
|
+
<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>
|
589
|
+
<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>
|
590
|
+
|
591
|
+
<span class='kw'>begin</span>
|
592
|
+
<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>
|
593
|
+
<span class='kw'>rescue</span>
|
594
|
+
<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>
|
595
|
+
<span class='kw'>end</span>
|
596
|
+
|
597
|
+
<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>
|
598
|
+
<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>
|
599
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
600
|
+
<span class='kw'>end</span></pre>
|
601
|
+
</td>
|
602
|
+
</tr>
|
603
|
+
</table>
|
604
|
+
</div>
|
605
|
+
|
606
|
+
<div class="method_details ">
|
607
|
+
<h3 class="signature " id="default_file-class_method">
|
608
|
+
|
609
|
+
+ (<tt>String|IO</tt>) <strong>default_file</strong>
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
</h3><div class="docstring">
|
616
|
+
<div class="discussion">
|
617
|
+
<p>The default file for logging.</p>
|
618
|
+
|
619
|
+
|
620
|
+
</div>
|
621
|
+
</div>
|
622
|
+
<div class="tags">
|
623
|
+
|
624
|
+
<p class="tag_title">Returns:</p>
|
625
|
+
<ul class="return">
|
626
|
+
|
627
|
+
<li>
|
628
|
+
|
629
|
+
|
630
|
+
<span class='type'>(<tt>String|IO</tt>)</span>
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
—
|
635
|
+
<div class='inline'><p>The default file for logging.</p>
|
636
|
+
</div>
|
637
|
+
|
638
|
+
</li>
|
639
|
+
|
640
|
+
</ul>
|
641
|
+
|
642
|
+
</div><table class="source_code">
|
643
|
+
<tr>
|
644
|
+
<td>
|
645
|
+
<pre class="lines">
|
646
|
+
|
647
|
+
|
648
|
+
62
|
649
|
+
63
|
650
|
+
64</pre>
|
651
|
+
</td>
|
652
|
+
<td>
|
653
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 62</span>
|
654
|
+
|
655
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span>
|
656
|
+
<span class='ivar'>@default_file</span> <span class='op'>||=</span> <span class='gvar'>$stdout</span>
|
657
|
+
<span class='kw'>end</span></pre>
|
658
|
+
</td>
|
659
|
+
</tr>
|
660
|
+
</table>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
<div class="method_details ">
|
664
|
+
<h3 class="signature " id="default_formatter-class_method">
|
665
|
+
|
666
|
+
+ (<tt>Proc</tt>) <strong>default_formatter</strong>
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
</h3><div class="docstring">
|
673
|
+
<div class="discussion">
|
674
|
+
<p>The default formatter for logging.</p>
|
675
|
+
|
676
|
+
|
677
|
+
</div>
|
678
|
+
</div>
|
679
|
+
<div class="tags">
|
680
|
+
|
681
|
+
<p class="tag_title">Returns:</p>
|
682
|
+
<ul class="return">
|
683
|
+
|
684
|
+
<li>
|
685
|
+
|
686
|
+
|
687
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
—
|
692
|
+
<div class='inline'><p>The default formatter for logging.</p>
|
693
|
+
</div>
|
694
|
+
|
695
|
+
</li>
|
696
|
+
|
697
|
+
</ul>
|
698
|
+
|
699
|
+
</div><table class="source_code">
|
700
|
+
<tr>
|
701
|
+
<td>
|
702
|
+
<pre class="lines">
|
703
|
+
|
704
|
+
|
705
|
+
68
|
706
|
+
69
|
707
|
+
70
|
708
|
+
71
|
709
|
+
72
|
710
|
+
73
|
711
|
+
74
|
712
|
+
75
|
713
|
+
76
|
714
|
+
77
|
715
|
+
78
|
716
|
+
79
|
717
|
+
80
|
718
|
+
81
|
719
|
+
82</pre>
|
720
|
+
</td>
|
721
|
+
<td>
|
722
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 68</span>
|
723
|
+
|
724
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_formatter'>default_formatter</span>
|
725
|
+
<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>
|
726
|
+
<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>
|
727
|
+
<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>
|
728
|
+
<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>
|
729
|
+
<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>
|
730
|
+
<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>
|
731
|
+
<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>
|
732
|
+
<span class='kw'>else</span> <span class='symbol'>:white</span>
|
733
|
+
<span class='kw'>end</span>
|
734
|
+
|
735
|
+
<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>
|
736
|
+
<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>
|
737
|
+
<span class='rbrace'>}</span>
|
738
|
+
<span class='kw'>end</span></pre>
|
739
|
+
</td>
|
740
|
+
</tr>
|
741
|
+
</table>
|
742
|
+
</div>
|
743
|
+
|
744
|
+
<div class="method_details ">
|
745
|
+
<h3 class="signature " id="get_real_file-class_method">
|
746
|
+
|
747
|
+
+ (<tt>String|IO</tt>) <strong>get_real_file</strong>(file)
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
</h3><div class="docstring">
|
754
|
+
<div class="discussion">
|
755
|
+
<p>Translates a file to standard input or standard ouput in some special cases.</p>
|
756
|
+
|
757
|
+
|
758
|
+
</div>
|
759
|
+
</div>
|
760
|
+
<div class="tags">
|
761
|
+
<p class="tag_title">Parameters:</p>
|
762
|
+
<ul class="param">
|
763
|
+
|
764
|
+
<li>
|
765
|
+
|
766
|
+
<span class='name'>file</span>
|
767
|
+
|
768
|
+
|
769
|
+
<span class='type'>(<tt>String</tt>)</span>
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
—
|
774
|
+
<div class='inline'><p>The string to translate.</p>
|
775
|
+
</div>
|
776
|
+
|
777
|
+
</li>
|
778
|
+
|
779
|
+
</ul>
|
780
|
+
|
781
|
+
<p class="tag_title">Returns:</p>
|
782
|
+
<ul class="return">
|
783
|
+
|
784
|
+
<li>
|
785
|
+
|
786
|
+
|
787
|
+
<span class='type'>(<tt>String|IO</tt>)</span>
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
—
|
792
|
+
<div class='inline'><p>The translated file name.</p>
|
793
|
+
</div>
|
794
|
+
|
795
|
+
</li>
|
796
|
+
|
797
|
+
</ul>
|
798
|
+
|
799
|
+
</div><table class="source_code">
|
800
|
+
<tr>
|
801
|
+
<td>
|
802
|
+
<pre class="lines">
|
803
|
+
|
804
|
+
|
805
|
+
52
|
806
|
+
53
|
807
|
+
54
|
808
|
+
55
|
809
|
+
56
|
810
|
+
57
|
811
|
+
58</pre>
|
812
|
+
</td>
|
813
|
+
<td>
|
814
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 52</span>
|
815
|
+
|
816
|
+
<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>
|
817
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_file'>file</span>
|
818
|
+
<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>
|
819
|
+
<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>
|
820
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_file'>file</span>
|
821
|
+
<span class='kw'>end</span>
|
822
|
+
<span class='kw'>end</span></pre>
|
823
|
+
</td>
|
824
|
+
</tr>
|
825
|
+
</table>
|
826
|
+
</div>
|
827
|
+
|
828
|
+
<div class="method_details ">
|
829
|
+
<h3 class="signature " id="start_time-class_method">
|
830
|
+
|
831
|
+
+ (<tt>Time</tt>) <strong>start_time</strong>
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
</h3><div class="docstring">
|
838
|
+
<div class="discussion">
|
839
|
+
<p>The log time of the first logger. This allows to show a <code>T+0.1234</code> information into the log.</p>
|
840
|
+
|
841
|
+
|
842
|
+
</div>
|
843
|
+
</div>
|
844
|
+
<div class="tags">
|
845
|
+
|
846
|
+
<p class="tag_title">Returns:</p>
|
847
|
+
<ul class="return">
|
848
|
+
|
849
|
+
<li>
|
850
|
+
|
851
|
+
|
852
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
853
|
+
|
854
|
+
|
855
|
+
|
856
|
+
—
|
857
|
+
<div class='inline'><p>The log time of the first logger.</p>
|
858
|
+
</div>
|
859
|
+
|
860
|
+
</li>
|
861
|
+
|
862
|
+
</ul>
|
863
|
+
|
864
|
+
</div><table class="source_code">
|
865
|
+
<tr>
|
866
|
+
<td>
|
867
|
+
<pre class="lines">
|
868
|
+
|
869
|
+
|
870
|
+
86
|
871
|
+
87
|
872
|
+
88</pre>
|
873
|
+
</td>
|
874
|
+
<td>
|
875
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/logger.rb', line 86</span>
|
876
|
+
|
877
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span>
|
878
|
+
<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>
|
879
|
+
<span class='kw'>end</span></pre>
|
880
|
+
</td>
|
881
|
+
</tr>
|
882
|
+
</table>
|
883
|
+
</div>
|
884
|
+
|
885
|
+
</div>
|
886
|
+
|
887
|
+
</div>
|
888
|
+
|
889
|
+
<div id="footer">
|
890
|
+
Generated on Sun Oct 21 11:18:28 2012 by
|
891
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
892
|
+
0.8.2.1 (ruby-1.9.2).
|
893
|
+
</div>
|
894
|
+
|
895
|
+
</body>
|
896
|
+
</html>
|