grafana 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +36 -0
- data/doc/Array.html +200 -0
- data/doc/Boolean.html +122 -0
- data/doc/FalseClass.html +132 -0
- data/doc/Grafana.html +172 -0
- data/doc/Hash.html +212 -0
- data/doc/Logging.html +326 -0
- data/doc/Object.html +286 -0
- data/doc/Time.html +200 -0
- data/doc/TrueClass.html +132 -0
- data/doc/_index.html +380 -0
- data/doc/class_list.html +51 -0
- data/doc/file.README.html +117 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +117 -0
- data/doc/method_list.html +771 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/grafana.rb +7 -0
- data/lib/grafana/admin.rb +310 -0
- data/lib/grafana/alerts.rb +38 -0
- data/lib/grafana/annotations.rb +40 -0
- data/lib/grafana/client.rb +126 -0
- data/lib/grafana/dashboard.rb +149 -0
- data/lib/grafana/dashboard_versions.rb +30 -0
- data/lib/grafana/datasource.rb +271 -0
- data/lib/grafana/login.rb +139 -0
- data/lib/grafana/network.rb +169 -0
- data/lib/grafana/organization.rb +101 -0
- data/lib/grafana/organizations.rb +406 -0
- data/lib/grafana/snapshot.rb +47 -0
- data/lib/grafana/tags.rb +41 -0
- data/lib/grafana/tools.rb +66 -0
- data/lib/grafana/user.rb +116 -0
- data/lib/grafana/users.rb +122 -0
- data/lib/grafana/validator.rb +28 -0
- data/lib/grafana/version.rb +17 -0
- data/lib/logging.rb +35 -0
- data/lib/monkey_patches.rb +92 -0
- metadata +294 -0
data/doc/Grafana.html
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Grafana
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.11
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Grafana";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (G)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Grafana</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Grafana
|
63
|
+
<span class="abstract note title">Abstract</span>
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/grafana/client.rb<span class="defines">,<br />
|
82
|
+
lib/grafana.rb,<br /> lib/grafana/tags.rb,<br /> lib/grafana/user.rb,<br /> lib/grafana/admin.rb,<br /> lib/grafana/login.rb,<br /> lib/grafana/tools.rb,<br /> lib/grafana/users.rb,<br /> lib/grafana/alerts.rb,<br /> lib/grafana/network.rb,<br /> lib/grafana/version.rb,<br /> lib/grafana/snapshot.rb,<br /> lib/grafana/dashboard.rb,<br /> lib/grafana/validator.rb,<br /> lib/grafana/datasource.rb,<br /> lib/grafana/annotations.rb,<br /> lib/grafana/organization.rb,<br /> lib/grafana/organizations.rb,<br /> lib/grafana/dashboard_versions.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
<div class="note abstract">
|
91
|
+
<strong>This module is abstract.</strong>
|
92
|
+
<div class='inline'>
|
93
|
+
<p># Namespace for classes and modules that handle all Grafana API calls</p>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<hr>
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<div class="tags">
|
102
|
+
|
103
|
+
<p class="tag_title">Author:</p>
|
104
|
+
<ul class="author">
|
105
|
+
|
106
|
+
<li>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<div class='inline'>
|
113
|
+
<p>Bodo Schulz <bodo@boone-schulz.de></p>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</li>
|
117
|
+
|
118
|
+
</ul>
|
119
|
+
|
120
|
+
</div><h2>Defined Under Namespace</h2>
|
121
|
+
<p class="children">
|
122
|
+
|
123
|
+
|
124
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Grafana/Admin.html" title="Grafana::Admin (module)">Admin</a></span>, <span class='object_link'><a href="Grafana/Alerts.html" title="Grafana::Alerts (module)">Alerts</a></span>, <span class='object_link'><a href="Grafana/Annotations.html" title="Grafana::Annotations (module)">Annotations</a></span>, <span class='object_link'><a href="Grafana/Dashboard.html" title="Grafana::Dashboard (module)">Dashboard</a></span>, <span class='object_link'><a href="Grafana/DashboardVersions.html" title="Grafana::DashboardVersions (module)">DashboardVersions</a></span>, <span class='object_link'><a href="Grafana/Datasource.html" title="Grafana::Datasource (module)">Datasource</a></span>, <span class='object_link'><a href="Grafana/Login.html" title="Grafana::Login (module)">Login</a></span>, <span class='object_link'><a href="Grafana/Network.html" title="Grafana::Network (module)">Network</a></span>, <span class='object_link'><a href="Grafana/Organization.html" title="Grafana::Organization (module)">Organization</a></span>, <span class='object_link'><a href="Grafana/Organizations.html" title="Grafana::Organizations (module)">Organizations</a></span>, <span class='object_link'><a href="Grafana/Snapshot.html" title="Grafana::Snapshot (module)">Snapshot</a></span>, <span class='object_link'><a href="Grafana/Tags.html" title="Grafana::Tags (module)">Tags</a></span>, <span class='object_link'><a href="Grafana/Tools.html" title="Grafana::Tools (module)">Tools</a></span>, <span class='object_link'><a href="Grafana/User.html" title="Grafana::User (module)">User</a></span>, <span class='object_link'><a href="Grafana/Users.html" title="Grafana::Users (module)">Users</a></span>, <span class='object_link'><a href="Grafana/Validator.html" title="Grafana::Validator (module)">Validator</a></span>, <span class='object_link'><a href="Grafana/Version.html" title="Grafana::Version (module)">Version</a></span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Grafana/Client.html" title="Grafana::Client (class)">Client</a></span>
|
129
|
+
|
130
|
+
|
131
|
+
</p>
|
132
|
+
|
133
|
+
<h2>Constant Summary</h2>
|
134
|
+
<dl class="constants">
|
135
|
+
|
136
|
+
<dt id="VERSION-constant" class="">VERSION =
|
137
|
+
<div class="docstring">
|
138
|
+
<div class="discussion">
|
139
|
+
|
140
|
+
<p>Current version of gem.</p>
|
141
|
+
|
142
|
+
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<div class="tags">
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
</dt>
|
150
|
+
<dd><pre class="code"><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="Grafana/Version.html" title="Grafana::Version (module)">Version</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Grafana/Version.html#MAJOR-constant" title="Grafana::Version::MAJOR (constant)">MAJOR</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Grafana/Version.html" title="Grafana::Version (module)">Version</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Grafana/Version.html#MINOR-constant" title="Grafana::Version::MINOR (constant)">MINOR</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Grafana/Version.html" title="Grafana::Version (module)">Version</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Grafana/Version.html#TINY-constant" title="Grafana::Version::TINY (constant)">TINY</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span> <span class='op'>*</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span></pre></dd>
|
151
|
+
|
152
|
+
</dl>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
</div>
|
163
|
+
|
164
|
+
<div id="footer">
|
165
|
+
Generated on Sun Dec 10 16:07:39 2017 by
|
166
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
167
|
+
0.9.11 (ruby-2.2.8).
|
168
|
+
</div>
|
169
|
+
|
170
|
+
</div>
|
171
|
+
</body>
|
172
|
+
</html>
|
data/doc/Hash.html
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Hash
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.11
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Hash";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (H)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Hash</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Hash
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></li>
|
76
|
+
|
77
|
+
<li class="next">Hash</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/monkey_patches.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>filter hash example: tags = [ 'foo', 'bar', 'fii' ]
|
106
|
+
useableTags = tags.filter( 'fii' )</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<h2>
|
123
|
+
Instance Method Summary
|
124
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
125
|
+
</h2>
|
126
|
+
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#filter-instance_method" title="#filter (instance method)">#<strong>filter</strong>(*args) ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
</ul>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<div id="instance_method_details" class="method_details_list">
|
157
|
+
<h2>Instance Method Details</h2>
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method_details first">
|
161
|
+
<h3 class="signature first" id="filter-instance_method">
|
162
|
+
|
163
|
+
#<strong>filter</strong>(*args) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</h3><table class="source_code">
|
170
|
+
<tr>
|
171
|
+
<td>
|
172
|
+
<pre class="lines">
|
173
|
+
|
174
|
+
|
175
|
+
60
|
176
|
+
61
|
177
|
+
62
|
178
|
+
63
|
179
|
+
64
|
180
|
+
65
|
181
|
+
66
|
182
|
+
67</pre>
|
183
|
+
</td>
|
184
|
+
<td>
|
185
|
+
<pre class="code"><span class="info file"># File 'lib/monkey_patches.rb', line 60</span>
|
186
|
+
|
187
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_filter'>filter</span><span class='lparen'>(</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
|
188
|
+
<span class='kw'>if</span><span class='lparen'>(</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
189
|
+
<span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span> <span class='const'>Symbol</span> <span class='rparen'>)</span>
|
190
|
+
<span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='rparen'>)</span> <span class='rbrace'>}</span>
|
191
|
+
<span class='kw'>else</span>
|
192
|
+
<span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span> <span class='id identifier rubyid_key'>key</span> <span class='rparen'>)</span> <span class='rbrace'>}</span>
|
193
|
+
<span class='kw'>end</span>
|
194
|
+
<span class='kw'>end</span></pre>
|
195
|
+
</td>
|
196
|
+
</tr>
|
197
|
+
</table>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
<div id="footer">
|
205
|
+
Generated on Sun Dec 10 16:07:39 2017 by
|
206
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
207
|
+
0.9.11 (ruby-2.2.8).
|
208
|
+
</div>
|
209
|
+
|
210
|
+
</div>
|
211
|
+
</body>
|
212
|
+
</html>
|
data/doc/Logging.html
ADDED
@@ -0,0 +1,326 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Logging
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.11
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Logging";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (L)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Logging</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Logging
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<dl>
|
78
|
+
<dt>Included in:</dt>
|
79
|
+
<dd><span class='object_link'><a href="Grafana/Client.html" title="Grafana::Client (class)">Grafana::Client</a></span></dd>
|
80
|
+
</dl>
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<dl>
|
85
|
+
<dt>Defined in:</dt>
|
86
|
+
<dd>lib/logging.rb</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<h2>Overview</h2><div class="docstring">
|
92
|
+
<div class="discussion">
|
93
|
+
<hr>
|
94
|
+
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div class="tags">
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<h2>
|
110
|
+
Class Method Summary
|
111
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
112
|
+
</h2>
|
113
|
+
|
114
|
+
<ul class="summary">
|
115
|
+
|
116
|
+
<li class="public ">
|
117
|
+
<span class="summary_signature">
|
118
|
+
|
119
|
+
<a href="#configure_logger_for-class_method" title="configure_logger_for (class method)">.<strong>configure_logger_for</strong>(classname) ⇒ Object </a>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
</span>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
134
|
+
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#logger_for-class_method" title="logger_for (class method)">.<strong>logger_for</strong>(classname) ⇒ Object </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
156
|
+
|
157
|
+
</li>
|
158
|
+
|
159
|
+
|
160
|
+
</ul>
|
161
|
+
|
162
|
+
<h2>
|
163
|
+
Instance Method Summary
|
164
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
165
|
+
</h2>
|
166
|
+
|
167
|
+
<ul class="summary">
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Object </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
</ul>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<div id="class_method_details" class="method_details_list">
|
197
|
+
<h2>Class Method Details</h2>
|
198
|
+
|
199
|
+
|
200
|
+
<div class="method_details first">
|
201
|
+
<h3 class="signature first" id="configure_logger_for-class_method">
|
202
|
+
|
203
|
+
.<strong>configure_logger_for</strong>(classname) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</h3><table class="source_code">
|
210
|
+
<tr>
|
211
|
+
<td>
|
212
|
+
<pre class="lines">
|
213
|
+
|
214
|
+
|
215
|
+
20
|
216
|
+
21
|
217
|
+
22
|
218
|
+
23
|
219
|
+
24
|
220
|
+
25
|
221
|
+
26
|
222
|
+
27
|
223
|
+
28
|
224
|
+
29
|
225
|
+
30
|
226
|
+
31</pre>
|
227
|
+
</td>
|
228
|
+
<td>
|
229
|
+
<pre class="code"><span class="info file"># File 'lib/logging.rb', line 20</span>
|
230
|
+
|
231
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_configure_logger_for'>configure_logger_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_classname'>classname</span> <span class='rparen'>)</span>
|
232
|
+
|
233
|
+
<span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>STDOUT</span><span class='rparen'>)</span>
|
234
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='id identifier rubyid_classname'>classname</span>
|
235
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</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'>DEBUG</span>
|
236
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_datetime_format'>datetime_format</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%Y-%m-%d %H:%M:%S::%3N</span><span class='tstring_end'>'</span></span>
|
237
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span> <span class='kw'>do</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>
|
238
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</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='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_datetime_format'>datetime_format</span> <span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>] </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_severity'>severity</span><span class='period'>.</span><span class='id identifier rubyid_ljust'>ljust</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> : </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_progname'>progname</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_msg'>msg</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
239
|
+
<span class='kw'>end</span>
|
240
|
+
|
241
|
+
<span class='id identifier rubyid_logger'>logger</span>
|
242
|
+
<span class='kw'>end</span></pre>
|
243
|
+
</td>
|
244
|
+
</tr>
|
245
|
+
</table>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<div class="method_details ">
|
249
|
+
<h3 class="signature " id="logger_for-class_method">
|
250
|
+
|
251
|
+
.<strong>logger_for</strong>(classname) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</h3><table class="source_code">
|
258
|
+
<tr>
|
259
|
+
<td>
|
260
|
+
<pre class="lines">
|
261
|
+
|
262
|
+
|
263
|
+
16
|
264
|
+
17
|
265
|
+
18</pre>
|
266
|
+
</td>
|
267
|
+
<td>
|
268
|
+
<pre class="code"><span class="info file"># File 'lib/logging.rb', line 16</span>
|
269
|
+
|
270
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_logger_for'>logger_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_classname'>classname</span> <span class='rparen'>)</span>
|
271
|
+
<span class='ivar'>@loggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_classname'>classname</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_configure_logger_for'>configure_logger_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_classname'>classname</span> <span class='rparen'>)</span>
|
272
|
+
<span class='kw'>end</span></pre>
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
</table>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div id="instance_method_details" class="method_details_list">
|
281
|
+
<h2>Instance Method Details</h2>
|
282
|
+
|
283
|
+
|
284
|
+
<div class="method_details first">
|
285
|
+
<h3 class="signature first" id="logger-instance_method">
|
286
|
+
|
287
|
+
#<strong>logger</strong> ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
</h3><table class="source_code">
|
294
|
+
<tr>
|
295
|
+
<td>
|
296
|
+
<pre class="lines">
|
297
|
+
|
298
|
+
|
299
|
+
8
|
300
|
+
9
|
301
|
+
10</pre>
|
302
|
+
</td>
|
303
|
+
<td>
|
304
|
+
<pre class="code"><span class="info file"># File 'lib/logging.rb', line 8</span>
|
305
|
+
|
306
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
|
307
|
+
<span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="" title="Logging (module)">Logging</a></span></span><span class='period'>.</span><span class='id identifier rubyid_logger_for'><span class='object_link'><a href="#logger_for-class_method" title="Logging.logger_for (method)">logger_for</a></span></span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
|
308
|
+
<span class='kw'>end</span></pre>
|
309
|
+
</td>
|
310
|
+
</tr>
|
311
|
+
</table>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div id="footer">
|
319
|
+
Generated on Sun Dec 10 16:07:39 2017 by
|
320
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
321
|
+
0.9.11 (ruby-2.2.8).
|
322
|
+
</div>
|
323
|
+
|
324
|
+
</div>
|
325
|
+
</body>
|
326
|
+
</html>
|