mr_loga_loga 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +2 -2
  3. data/.gitignore +1 -0
  4. data/.yardopts +1 -0
  5. data/CHANGELOG.md +17 -0
  6. data/Gemfile.lock +7 -3
  7. data/README.md +4 -4
  8. data/docs/MrLogaLoga/Configuration.html +376 -0
  9. data/docs/MrLogaLoga/Context.html +628 -0
  10. data/docs/MrLogaLoga/Error.html +124 -0
  11. data/docs/MrLogaLoga/Extensions/LogrageExtension.html +305 -0
  12. data/docs/MrLogaLoga/Extensions/RailsExtension/LoggerPatch.html +322 -0
  13. data/docs/MrLogaLoga/Extensions/RailsExtension/ServerPatch.html +201 -0
  14. data/docs/MrLogaLoga/Extensions/RailsExtension.html +242 -0
  15. data/docs/MrLogaLoga/Extensions.html +117 -0
  16. data/docs/MrLogaLoga/Formatters/Json.html +350 -0
  17. data/docs/MrLogaLoga/Formatters/KeyValue.html +338 -0
  18. data/docs/MrLogaLoga/Formatters.html +117 -0
  19. data/docs/MrLogaLoga/InstanceMethods.html +350 -0
  20. data/docs/MrLogaLoga/Logger.html +618 -0
  21. data/docs/MrLogaLoga/LoggerProxy.html +319 -0
  22. data/docs/MrLogaLoga.html +374 -0
  23. data/docs/_config.yml +1 -0
  24. data/docs/_index.html +280 -0
  25. data/docs/class_list.html +51 -0
  26. data/docs/css/common.css +1 -0
  27. data/docs/css/full_list.css +58 -0
  28. data/docs/css/style.css +497 -0
  29. data/docs/file.README.html +255 -0
  30. data/docs/file_list.html +56 -0
  31. data/docs/frames.html +17 -0
  32. data/docs/index.html +255 -0
  33. data/docs/js/app.js +314 -0
  34. data/docs/js/full_list.js +216 -0
  35. data/docs/js/jquery.js +4 -0
  36. data/docs/method_list.html +283 -0
  37. data/docs/top-level-namespace.html +110 -0
  38. data/lib/mr_loga_loga/context.rb +10 -0
  39. data/lib/mr_loga_loga/extensions/{lograge_patch.rb → lograge.rb} +19 -6
  40. data/lib/mr_loga_loga/extensions/rails.rb +142 -0
  41. data/lib/mr_loga_loga/instance_methods.rb +5 -1
  42. data/lib/mr_loga_loga/logger.rb +3 -5
  43. data/lib/mr_loga_loga/version.rb +1 -1
  44. data/lib/mr_loga_loga.rb +3 -3
  45. data/mr_loga_loga.gemspec +3 -2
  46. metadata +53 -8
  47. data/lib/mr_loga_loga/extensions/active_support_logger_patch.rb +0 -94
@@ -0,0 +1,124 @@
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
+ Exception: MrLogaLoga::Error
8
+
9
+ &mdash; Documentation by YARD 0.9.27
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "MrLogaLoga::Error";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span>
41
+ &raquo;
42
+ <span class="title">Error</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>Exception: MrLogaLoga::Error
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">MrLogaLoga::Error</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/mr_loga_loga.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Wed Jan 5 09:59:09 2022 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.9.27 (ruby-3.0.0).
120
+ </div>
121
+
122
+ </div>
123
+ </body>
124
+ </html>
@@ -0,0 +1,305 @@
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: MrLogaLoga::Extensions::LogrageExtension
8
+
9
+ &mdash; Documentation by YARD 0.9.27
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "MrLogaLoga::Extensions::LogrageExtension";
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> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Extensions.html" title="MrLogaLoga::Extensions (module)">Extensions</a></span></span>
41
+ &raquo;
42
+ <span class="title">LogrageExtension</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: MrLogaLoga::Extensions::LogrageExtension
63
+
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/mr_loga_loga/extensions/lograge.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+
89
+ <h2 id="label-Description">Description</h2>
90
+
91
+ <p>This patches Lograge to forward data as context to MrLogaLoga.</p>
92
+
93
+ <p>We want Lograge to forward requeest data not to it&#39;s own formatter and then to the logger, as this would make that data part of the message. Rather, where Lograge normally sends the formatted message to the logger we send the raw data.</p>
94
+
95
+ <p>This effectively circumvents Lograge&#39;s formatters.</p>
96
+
97
+ <h2 id="label-Patches">Patches</h2>
98
+ <ul><li>
99
+ <p>Lograge::LogSubscribers#process_main_event</p>
100
+ </li></ul>
101
+
102
+
103
+ </div>
104
+ </div>
105
+ <div class="tags">
106
+
107
+
108
+ </div>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <h2>
117
+ Class Method Summary
118
+ <small><a href="#" class="summary_toggle">collapse</a></small>
119
+ </h2>
120
+
121
+ <ul class="summary">
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#apply-class_method" title="apply (class method)">.<strong>apply</strong> &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+ <h2>
148
+ Instance Method Summary
149
+ <small><a href="#" class="summary_toggle">collapse</a></small>
150
+ </h2>
151
+
152
+ <ul class="summary">
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#process_main_event-instance_method" title="#process_main_event (instance method)">#<strong>process_main_event</strong>(event) &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+ <div id="class_method_details" class="method_details_list">
182
+ <h2>Class Method Details</h2>
183
+
184
+
185
+ <div class="method_details first">
186
+ <h3 class="signature first" id="apply-class_method">
187
+
188
+ .<strong>apply</strong> &#x21d2; <tt>Object</tt>
189
+
190
+
191
+
192
+
193
+
194
+ </h3><table class="source_code">
195
+ <tr>
196
+ <td>
197
+ <pre class="lines">
198
+
199
+
200
+ 21
201
+ 22
202
+ 23
203
+ 24
204
+ 25
205
+ 26
206
+ 27
207
+ 28
208
+ 29
209
+ 30
210
+ 31
211
+ 32
212
+ 33</pre>
213
+ </td>
214
+ <td>
215
+ <pre class="code"><span class="info file"># File 'lib/mr_loga_loga/extensions/lograge.rb', line 21</span>
216
+
217
+ <span class='kw'>def</span> <span class='id identifier rubyid_apply'>apply</span>
218
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Lograge</span><span class='rparen'>)</span>
219
+
220
+ <span class='id identifier rubyid_patch_applies'>patch_applies</span> <span class='op'>=</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Lograge</span><span class='op'>::</span><span class='const'>LogSubscribers</span><span class='op'>::</span><span class='const'>Base</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
221
+ <span class='const'>Lograge</span><span class='op'>::</span><span class='const'>LogSubscribers</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_private_method_defined?'>private_method_defined?</span><span class='lparen'>(</span><span class='symbol'>:process_main_event</span><span class='rparen'>)</span>
222
+ <span class='kw'>unless</span> <span class='id identifier rubyid_patch_applies'>patch_applies</span>
223
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WARNING: Failed to patch Lograge. It looks like MrLogaLoga&#39;s patch no longer applies in </span><span class='tstring_end'>&quot;</span></span>\
224
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='kw'>__FILE__</span><span class='embexpr_end'>}</span><span class='tstring_content'>. Please contact MrLogaLoga maintainers.</span><span class='tstring_end'>&quot;</span></span>
225
+ <span class='kw'>return</span>
226
+ <span class='kw'>end</span>
227
+
228
+ <span class='const'>Lograge</span><span class='op'>::</span><span class='const'>LogSubscribers</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
229
+ <span class='kw'>end</span></pre>
230
+ </td>
231
+ </tr>
232
+ </table>
233
+ </div>
234
+
235
+ </div>
236
+
237
+ <div id="instance_method_details" class="method_details_list">
238
+ <h2>Instance Method Details</h2>
239
+
240
+
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="process_main_event-instance_method">
243
+
244
+ #<strong>process_main_event</strong>(event) &#x21d2; <tt>Object</tt>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><table class="source_code">
251
+ <tr>
252
+ <td>
253
+ <pre class="lines">
254
+
255
+
256
+ 36
257
+ 37
258
+ 38
259
+ 39
260
+ 40
261
+ 41
262
+ 42
263
+ 43
264
+ 44
265
+ 45
266
+ 46
267
+ 47
268
+ 48
269
+ 49</pre>
270
+ </td>
271
+ <td>
272
+ <pre class="code"><span class="info file"># File 'lib/mr_loga_loga/extensions/lograge.rb', line 36</span>
273
+
274
+ <span class='kw'>def</span> <span class='id identifier rubyid_process_main_event'>process_main_event</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
275
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='const'>Lograge</span><span class='period'>.</span><span class='id identifier rubyid_ignore?'>ignore?</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
276
+
277
+ <span class='id identifier rubyid_payload'>payload</span> <span class='op'>=</span> <span class='id identifier rubyid_event'>event</span><span class='period'>.</span><span class='id identifier rubyid_payload'>payload</span>
278
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_request'>extract_request</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
279
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_before_format'>before_format</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
280
+ <span class='comment'># Instead of
281
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Logger.html" title="MrLogaLoga::Logger (class)">Logger</a></span></span><span class='rparen'>)</span>
282
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='const'>Lograge</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
283
+ <span class='kw'>else</span>
284
+ <span class='id identifier rubyid_formatted_message'>formatted_message</span> <span class='op'>=</span> <span class='const'>Lograge</span><span class='period'>.</span><span class='id identifier rubyid_formatter'>formatter</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
285
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='const'>Lograge</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span> <span class='id identifier rubyid_formatted_message'>formatted_message</span><span class='rparen'>)</span>
286
+ <span class='kw'>end</span>
287
+ <span class='kw'>end</span></pre>
288
+ </td>
289
+ </tr>
290
+ </table>
291
+ </div>
292
+
293
+ </div>
294
+
295
+ </div>
296
+
297
+ <div id="footer">
298
+ Generated on Wed Jan 5 09:59:09 2022 by
299
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
300
+ 0.9.27 (ruby-3.0.0).
301
+ </div>
302
+
303
+ </div>
304
+ </body>
305
+ </html>