longleaf 0.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +94 -0
- data/.editorconfig +13 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +44 -0
- data/.rubocop_todo.yml +834 -0
- data/.yardopts +1 -0
- data/Gemfile +16 -1
- data/README.md +98 -12
- data/Rakefile +6 -0
- data/bin/setup +16 -1
- data/docs/aboutlongleaf.md +28 -0
- data/docs/extra.css +32 -0
- data/docs/img/change-file.png +0 -0
- data/docs/img/ll-example-preserved.png +0 -0
- data/docs/index.md +19 -0
- data/docs/install.md +66 -0
- data/docs/ll-example/config-example-relative.yml +33 -0
- data/docs/ll-example/files-dir/LLexample-PDF.pdf +0 -0
- data/docs/ll-example/files-dir/LLexample-TOCHANGE.txt +15 -0
- data/docs/ll-example/files-dir/LLexample-tokeep.txt +10 -0
- data/docs/ll-example/metadata-dir/.gitkeep +0 -0
- data/docs/ll-example/replica-files/.gitkeep +0 -0
- data/docs/ll-example/replica-metadata/.gitkeep +0 -0
- data/docs/quickstart.md +270 -0
- data/docs/rdocs/Longleaf.html +135 -0
- data/docs/rdocs/Longleaf/AppFields.html +178 -0
- data/docs/rdocs/Longleaf/ApplicationConfigDeserializer.html +631 -0
- data/docs/rdocs/Longleaf/ApplicationConfigManager.html +610 -0
- data/docs/rdocs/Longleaf/ApplicationConfigValidator.html +238 -0
- data/docs/rdocs/Longleaf/CLI.html +909 -0
- data/docs/rdocs/Longleaf/ChecksumMismatchError.html +151 -0
- data/docs/rdocs/Longleaf/ConfigBuilder.html +1339 -0
- data/docs/rdocs/Longleaf/ConfigurationError.html +143 -0
- data/docs/rdocs/Longleaf/ConfigurationValidator.html +227 -0
- data/docs/rdocs/Longleaf/DeregisterCommand.html +420 -0
- data/docs/rdocs/Longleaf/DeregisterEvent.html +453 -0
- data/docs/rdocs/Longleaf/DeregistrationError.html +151 -0
- data/docs/rdocs/Longleaf/DigestHelper.html +419 -0
- data/docs/rdocs/Longleaf/EventError.html +147 -0
- data/docs/rdocs/Longleaf/EventNames.html +163 -0
- data/docs/rdocs/Longleaf/EventStatusTracking.html +656 -0
- data/docs/rdocs/Longleaf/FileCheckService.html +540 -0
- data/docs/rdocs/Longleaf/FileHelpers.html +520 -0
- data/docs/rdocs/Longleaf/FileRecord.html +716 -0
- data/docs/rdocs/Longleaf/FileSelector.html +901 -0
- data/docs/rdocs/Longleaf/FixityCheckService.html +691 -0
- data/docs/rdocs/Longleaf/IndexManager.html +1155 -0
- data/docs/rdocs/Longleaf/InvalidDigestAlgorithmError.html +143 -0
- data/docs/rdocs/Longleaf/InvalidStoragePathError.html +143 -0
- data/docs/rdocs/Longleaf/Logging.html +405 -0
- data/docs/rdocs/Longleaf/Logging/RedirectingLogger.html +1213 -0
- data/docs/rdocs/Longleaf/LongleafError.html +139 -0
- data/docs/rdocs/Longleaf/MDFields.html +193 -0
- data/docs/rdocs/Longleaf/MetadataBuilder.html +787 -0
- data/docs/rdocs/Longleaf/MetadataDeserializer.html +537 -0
- data/docs/rdocs/Longleaf/MetadataError.html +143 -0
- data/docs/rdocs/Longleaf/MetadataPersistenceManager.html +539 -0
- data/docs/rdocs/Longleaf/MetadataRecord.html +1411 -0
- data/docs/rdocs/Longleaf/MetadataSerializer.html +786 -0
- data/docs/rdocs/Longleaf/PreservationServiceError.html +147 -0
- data/docs/rdocs/Longleaf/PreserveCommand.html +410 -0
- data/docs/rdocs/Longleaf/PreserveEvent.html +491 -0
- data/docs/rdocs/Longleaf/RegisterCommand.html +428 -0
- data/docs/rdocs/Longleaf/RegisterEvent.html +628 -0
- data/docs/rdocs/Longleaf/RegisteredFileSelector.html +446 -0
- data/docs/rdocs/Longleaf/RegistrationError.html +151 -0
- data/docs/rdocs/Longleaf/ReindexCommand.html +576 -0
- data/docs/rdocs/Longleaf/RsyncReplicationService.html +1180 -0
- data/docs/rdocs/Longleaf/SequelIndexDriver.html +1978 -0
- data/docs/rdocs/Longleaf/ServiceCandidateFilesystemIterator.html +572 -0
- data/docs/rdocs/Longleaf/ServiceCandidateIndexIterator.html +532 -0
- data/docs/rdocs/Longleaf/ServiceCandidateLocator.html +333 -0
- data/docs/rdocs/Longleaf/ServiceClassCache.html +725 -0
- data/docs/rdocs/Longleaf/ServiceDateHelper.html +425 -0
- data/docs/rdocs/Longleaf/ServiceDefinition.html +683 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionManager.html +371 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionValidator.html +269 -0
- data/docs/rdocs/Longleaf/ServiceFields.html +173 -0
- data/docs/rdocs/Longleaf/ServiceManager.html +1229 -0
- data/docs/rdocs/Longleaf/ServiceMappingManager.html +410 -0
- data/docs/rdocs/Longleaf/ServiceMappingValidator.html +347 -0
- data/docs/rdocs/Longleaf/ServiceRecord.html +821 -0
- data/docs/rdocs/Longleaf/StorageLocation.html +985 -0
- data/docs/rdocs/Longleaf/StorageLocationManager.html +729 -0
- data/docs/rdocs/Longleaf/StorageLocationUnavailableError.html +143 -0
- data/docs/rdocs/Longleaf/StorageLocationValidator.html +373 -0
- data/docs/rdocs/Longleaf/StoragePathValidator.html +253 -0
- data/docs/rdocs/Longleaf/SystemConfigBuilder.html +441 -0
- data/docs/rdocs/Longleaf/SystemConfigFields.html +163 -0
- data/docs/rdocs/Longleaf/ValidateConfigCommand.html +451 -0
- data/docs/rdocs/Longleaf/ValidateMetadataCommand.html +408 -0
- data/docs/rdocs/_index.html +660 -0
- data/docs/rdocs/class_list.html +51 -0
- data/docs/rdocs/css/common.css +1 -0
- data/docs/rdocs/css/full_list.css +58 -0
- data/docs/rdocs/css/style.css +496 -0
- data/docs/rdocs/file.README.html +165 -0
- data/docs/rdocs/file_list.html +56 -0
- data/docs/rdocs/frames.html +17 -0
- data/docs/rdocs/index.html +165 -0
- data/docs/rdocs/js/app.js +303 -0
- data/docs/rdocs/js/full_list.js +216 -0
- data/docs/rdocs/js/jquery.js +4 -0
- data/docs/rdocs/method_list.html +2051 -0
- data/docs/rdocs/top-level-namespace.html +110 -0
- data/lib/longleaf/candidates/file_selector.rb +150 -0
- data/lib/longleaf/candidates/manifest_digest_provider.rb +17 -0
- data/lib/longleaf/candidates/physical_path_provider.rb +17 -0
- data/lib/longleaf/candidates/registered_file_selector.rb +67 -0
- data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +93 -0
- data/lib/longleaf/candidates/service_candidate_index_iterator.rb +84 -0
- data/lib/longleaf/candidates/service_candidate_locator.rb +23 -0
- data/lib/longleaf/candidates/single_digest_provider.rb +13 -0
- data/lib/longleaf/cli.rb +252 -46
- data/lib/longleaf/commands/deregister_command.rb +51 -0
- data/lib/longleaf/commands/preserve_command.rb +50 -0
- data/lib/longleaf/commands/register_command.rb +34 -43
- data/lib/longleaf/commands/reindex_command.rb +92 -0
- data/lib/longleaf/commands/validate_config_command.rb +33 -8
- data/lib/longleaf/commands/validate_metadata_command.rb +51 -0
- data/lib/longleaf/errors.rb +26 -7
- data/lib/longleaf/events/deregister_event.rb +53 -0
- data/lib/longleaf/events/event_names.rb +9 -0
- data/lib/longleaf/events/event_status_tracking.rb +59 -0
- data/lib/longleaf/events/preserve_event.rb +82 -0
- data/lib/longleaf/events/register_event.rb +59 -51
- data/lib/longleaf/helpers/case_insensitive_hash.rb +38 -0
- data/lib/longleaf/helpers/digest_helper.rb +56 -0
- data/lib/longleaf/helpers/s3_uri_helper.rb +86 -0
- data/lib/longleaf/helpers/selection_options_parser.rb +215 -0
- data/lib/longleaf/helpers/service_date_helper.rb +78 -0
- data/lib/longleaf/indexing/index_manager.rb +101 -0
- data/lib/longleaf/indexing/sequel_index_driver.rb +306 -0
- data/lib/longleaf/logging.rb +5 -4
- data/lib/longleaf/logging/redirecting_logger.rb +30 -25
- data/lib/longleaf/models/app_fields.rb +7 -2
- data/lib/longleaf/models/file_record.rb +31 -8
- data/lib/longleaf/models/filesystem_metadata_location.rb +56 -0
- data/lib/longleaf/models/filesystem_storage_location.rb +52 -0
- data/lib/longleaf/models/md_fields.rb +3 -1
- data/lib/longleaf/models/metadata_location.rb +47 -0
- data/lib/longleaf/models/metadata_record.rb +43 -16
- data/lib/longleaf/models/s3_storage_location.rb +138 -0
- data/lib/longleaf/models/service_definition.rb +7 -6
- data/lib/longleaf/models/service_fields.rb +7 -1
- data/lib/longleaf/models/service_record.rb +10 -6
- data/lib/longleaf/models/storage_location.rb +24 -19
- data/lib/longleaf/models/storage_types.rb +9 -0
- data/lib/longleaf/models/system_config_fields.rb +9 -0
- data/lib/longleaf/preservation_services/file_check_service.rb +59 -0
- data/lib/longleaf/preservation_services/fixity_check_service.rb +124 -0
- data/lib/longleaf/preservation_services/rsync_replication_service.rb +198 -0
- data/lib/longleaf/preservation_services/s3_replication_service.rb +131 -0
- data/lib/longleaf/services/application_config_deserializer.rb +81 -24
- data/lib/longleaf/services/application_config_manager.rb +20 -6
- data/lib/longleaf/services/application_config_validator.rb +19 -9
- data/lib/longleaf/services/configuration_validator.rb +67 -4
- data/lib/longleaf/services/filesystem_location_validator.rb +16 -0
- data/lib/longleaf/services/metadata_deserializer.rb +115 -42
- data/lib/longleaf/services/metadata_persistence_manager.rb +47 -0
- data/lib/longleaf/services/metadata_serializer.rb +156 -23
- data/lib/longleaf/services/metadata_validator.rb +76 -0
- data/lib/longleaf/services/s3_location_validator.rb +19 -0
- data/lib/longleaf/services/service_class_cache.rb +112 -0
- data/lib/longleaf/services/service_definition_manager.rb +10 -7
- data/lib/longleaf/services/service_definition_validator.rb +25 -18
- data/lib/longleaf/services/service_manager.rb +86 -11
- data/lib/longleaf/services/service_mapping_manager.rb +13 -12
- data/lib/longleaf/services/service_mapping_validator.rb +36 -26
- data/lib/longleaf/services/storage_location_manager.rb +76 -15
- data/lib/longleaf/services/storage_location_validator.rb +49 -35
- data/lib/longleaf/specs/config_builder.rb +47 -23
- data/lib/longleaf/specs/config_validator_helpers.rb +16 -0
- data/lib/longleaf/specs/custom_matchers.rb +9 -0
- data/lib/longleaf/specs/file_helpers.rb +61 -0
- data/lib/longleaf/specs/metadata_builder.rb +98 -0
- data/lib/longleaf/specs/system_config_builder.rb +27 -0
- data/lib/longleaf/version.rb +1 -1
- data/longleaf.gemspec +20 -7
- data/mkdocs.yml +21 -0
- metadata +308 -24
- data/.travis.yml +0 -4
- data/lib/longleaf/commands/abstract_command.rb +0 -37
- data/lib/longleaf/services/storage_path_validator.rb +0 -16
@@ -0,0 +1,1213 @@
|
|
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: Longleaf::Logging::RedirectingLogger
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.19
|
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 = "Longleaf::Logging::RedirectingLogger";
|
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 (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span> » <span class='title'><span class='object_link'><a href="../Logging.html" title="Longleaf::Logging (module)">Logging</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">RedirectingLogger</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: Longleaf::Logging::RedirectingLogger
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Longleaf::Logging::RedirectingLogger</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/longleaf/logging/redirecting_logger.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Logger which directs messages to stdout and/or stderr, depending on the nature of the message. Status logging, which includes standard logger methods, goes to STDERR. Operation success and failure messages go to STDOUT, and to STDERR at info level.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#debug-instance_method" title="#debug (instance method)">#<strong>debug</strong>(progname = nil, &block) ⇒ Object </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#error-instance_method" title="#error (instance method)">#<strong>error</strong>(progname = nil, &block) ⇒ Object </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#failure-instance_method" title="#failure (instance method)">#<strong>failure</strong>(eventOrMessage, file_name = nil, message = nil, service = nil, error: nil) ⇒ Object </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>Logs a failure message to STDOUT, as well as STDERR at info level.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#fatal-instance_method" title="#fatal (instance method)">#<strong>fatal</strong>(progname = nil, &block) ⇒ Object </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
214
|
+
|
215
|
+
</li>
|
216
|
+
|
217
|
+
|
218
|
+
<li class="public ">
|
219
|
+
<span class="summary_signature">
|
220
|
+
|
221
|
+
<a href="#info-instance_method" title="#info (instance method)">#<strong>info</strong>(progname = nil, &block) ⇒ Object </a>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
</span>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(failure_only: false, log_level: 'WARN', log_format: nil, datetime_format: nil) ⇒ RedirectingLogger </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
<span class="note title constructor">constructor</span>
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<span class="summary_desc"><div class='inline'>
|
260
|
+
<p>A new instance of RedirectingLogger.</p>
|
261
|
+
</div></span>
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
265
|
+
|
266
|
+
<li class="public ">
|
267
|
+
<span class="summary_signature">
|
268
|
+
|
269
|
+
<a href="#outcome-instance_method" title="#outcome (instance method)">#<strong>outcome</strong>(outcome, eventOrMessage, file_name = nil, message = nil, service = nil, error = nil) ⇒ Object </a>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
<span class="summary_desc"><div class='inline'>
|
284
|
+
<p>Logs an outcome message to STDOUT, as well as STDERR at info level.</p>
|
285
|
+
</div></span>
|
286
|
+
|
287
|
+
</li>
|
288
|
+
|
289
|
+
|
290
|
+
<li class="private ">
|
291
|
+
<span class="summary_signature">
|
292
|
+
|
293
|
+
<a href="#outcome_text-instance_method" title="#outcome_text (instance method)">#<strong>outcome_text</strong>(outcome, eventOrMessage, file_name = nil, message = nil, service = nil, error = nil) ⇒ Object </a>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</span>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="note title private">private</span>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
308
|
+
|
309
|
+
</li>
|
310
|
+
|
311
|
+
|
312
|
+
<li class="public ">
|
313
|
+
<span class="summary_signature">
|
314
|
+
|
315
|
+
<a href="#success-instance_method" title="#success (instance method)">#<strong>success</strong>(eventOrMessage, file_name = nil, message = nil, service = nil) ⇒ Object </a>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
</span>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<span class="summary_desc"><div class='inline'>
|
330
|
+
<p>Logs a success message to STDOUT, as well as STDERR at info level.</p>
|
331
|
+
</div></span>
|
332
|
+
|
333
|
+
</li>
|
334
|
+
|
335
|
+
|
336
|
+
<li class="public ">
|
337
|
+
<span class="summary_signature">
|
338
|
+
|
339
|
+
<a href="#unknown-instance_method" title="#unknown (instance method)">#<strong>unknown</strong>(progname = nil, &block) ⇒ Object </a>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
</span>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
354
|
+
|
355
|
+
</li>
|
356
|
+
|
357
|
+
|
358
|
+
<li class="public ">
|
359
|
+
<span class="summary_signature">
|
360
|
+
|
361
|
+
<a href="#warn-instance_method" title="#warn (instance method)">#<strong>warn</strong>(progname = nil, &block) ⇒ Object </a>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
</span>
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
376
|
+
|
377
|
+
</li>
|
378
|
+
|
379
|
+
|
380
|
+
</ul>
|
381
|
+
|
382
|
+
|
383
|
+
<div id="constructor_details" class="method_details_list">
|
384
|
+
<h2>Constructor Details</h2>
|
385
|
+
|
386
|
+
<div class="method_details first">
|
387
|
+
<h3 class="signature first" id="initialize-instance_method">
|
388
|
+
|
389
|
+
#<strong>initialize</strong>(failure_only: false, log_level: 'WARN', log_format: nil, datetime_format: nil) ⇒ <tt><span class='object_link'><a href="" title="Longleaf::Logging::RedirectingLogger (class)">RedirectingLogger</a></span></tt>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
</h3><div class="docstring">
|
396
|
+
<div class="discussion">
|
397
|
+
|
398
|
+
<p>Returns a new instance of RedirectingLogger</p>
|
399
|
+
|
400
|
+
|
401
|
+
</div>
|
402
|
+
</div>
|
403
|
+
<div class="tags">
|
404
|
+
<p class="tag_title">Parameters:</p>
|
405
|
+
<ul class="param">
|
406
|
+
|
407
|
+
<li>
|
408
|
+
|
409
|
+
<span class='name'>failure_only</span>
|
410
|
+
|
411
|
+
|
412
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
—
|
417
|
+
<div class='inline'>
|
418
|
+
<p>If set to true, only failure messages will be output to STDOUT</p>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
</li>
|
422
|
+
|
423
|
+
<li>
|
424
|
+
|
425
|
+
<span class='name'>log_level</span>
|
426
|
+
|
427
|
+
|
428
|
+
<span class='type'>(<tt>String</tt>)</span>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
—
|
433
|
+
<div class='inline'>
|
434
|
+
<p>logger level used for output to STDERR</p>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
</li>
|
438
|
+
|
439
|
+
<li>
|
440
|
+
|
441
|
+
<span class='name'>log_format</span>
|
442
|
+
|
443
|
+
|
444
|
+
<span class='type'>(<tt>String</tt>)</span>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
—
|
449
|
+
<div class='inline'>
|
450
|
+
<p>format string for log entries to STDERR. There are 4 variables available for inclusion in the output: severity, datetime, progname, msg. Variables must be wrapped in %{}.</p>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
</li>
|
454
|
+
|
455
|
+
<li>
|
456
|
+
|
457
|
+
<span class='name'>datetime_format</span>
|
458
|
+
|
459
|
+
|
460
|
+
<span class='type'>(<tt>String</tt>)</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
—
|
465
|
+
<div class='inline'>
|
466
|
+
<p>datetime formatting string used for logger dates appearing in STDERR.</p>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
</li>
|
470
|
+
|
471
|
+
</ul>
|
472
|
+
|
473
|
+
|
474
|
+
</div><table class="source_code">
|
475
|
+
<tr>
|
476
|
+
<td>
|
477
|
+
<pre class="lines">
|
478
|
+
|
479
|
+
|
480
|
+
14
|
481
|
+
15
|
482
|
+
16
|
483
|
+
17
|
484
|
+
18
|
485
|
+
19
|
486
|
+
20
|
487
|
+
21
|
488
|
+
22
|
489
|
+
23
|
490
|
+
24
|
491
|
+
25
|
492
|
+
26
|
493
|
+
27
|
494
|
+
28
|
495
|
+
29
|
496
|
+
30
|
497
|
+
31
|
498
|
+
32
|
499
|
+
33
|
500
|
+
34
|
501
|
+
35
|
502
|
+
36
|
503
|
+
37
|
504
|
+
38
|
505
|
+
39
|
506
|
+
40
|
507
|
+
41
|
508
|
+
42
|
509
|
+
43</pre>
|
510
|
+
</td>
|
511
|
+
<td>
|
512
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 14</span>
|
513
|
+
|
514
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>failure_only:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>log_level:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>WARN</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>log_format:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>datetime_format:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
515
|
+
<span class='ivar'>@stderr_log</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='gvar'>$stderr</span><span class='rparen'>)</span>
|
516
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='id identifier rubyid_log_level'>log_level</span>
|
517
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_datetime_format'>datetime_format</span> <span class='op'>=</span> <span class='id identifier rubyid_datetime_format'>datetime_format</span>
|
518
|
+
<span class='ivar'>@log_format</span> <span class='op'>=</span> <span class='id identifier rubyid_log_format'>log_format</span>
|
519
|
+
<span class='kw'>if</span> <span class='ivar'>@log_format</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
520
|
+
<span class='ivar'>@stderr_log</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>
|
521
|
+
<span class='id identifier rubyid_formatted_date'>formatted_date</span> <span class='op'>=</span> <span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_datetime_format'>datetime_format</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='id identifier rubyid_datetime'>datetime</span> <span class='op'>:</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_datetime_format'>datetime_format</span><span class='rparen'>)</span>
|
522
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_severity'>severity</span><span class='embexpr_end'>}</span><span class='tstring_content'> [</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_formatted_date'>formatted_date</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>
|
523
|
+
<span class='kw'>end</span>
|
524
|
+
<span class='kw'>elsif</span> <span class='ivar'>@log_format</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
525
|
+
<span class='ivar'>@stderr_log</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>
|
526
|
+
<span class='comment'># Make sure the format ends with a newline
|
527
|
+
</span> <span class='ivar'>@log_format</span> <span class='op'>=</span> <span class='ivar'>@log_format</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@log_format</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
528
|
+
|
529
|
+
<span class='id identifier rubyid_formatted_date'>formatted_date</span> <span class='op'>=</span> <span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_datetime_format'>datetime_format</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='id identifier rubyid_datetime'>datetime</span> <span class='op'>:</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_datetime_format'>datetime_format</span><span class='rparen'>)</span>
|
530
|
+
<span class='ivar'>@log_format</span> <span class='op'>%</span> <span class='lbrace'>{</span> <span class='symbol'>:severity</span> <span class='op'>=></span> <span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='symbol'>:datetime</span> <span class='op'>=></span> <span class='id identifier rubyid_formatted_date'>formatted_date</span><span class='comma'>,</span> <span class='symbol'>:progname</span> <span class='op'>=></span> <span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='symbol'>:msg</span> <span class='op'>=></span> <span class='id identifier rubyid_msg'>msg</span> <span class='rbrace'>}</span>
|
531
|
+
<span class='kw'>end</span>
|
532
|
+
<span class='kw'>end</span>
|
533
|
+
|
534
|
+
<span class='ivar'>@stdout_log</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='gvar'>$stdout</span><span class='rparen'>)</span>
|
535
|
+
<span class='ivar'>@stdout_log</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>
|
536
|
+
<span class='tstring'><span class='tstring_beg'>"</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>
|
537
|
+
<span class='kw'>end</span>
|
538
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_failure_only'>failure_only</span>
|
539
|
+
<span class='ivar'>@stdout_log</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>warn</span><span class='tstring_end'>'</span></span>
|
540
|
+
<span class='kw'>else</span>
|
541
|
+
<span class='ivar'>@stdout_log</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>info</span><span class='tstring_end'>'</span></span>
|
542
|
+
<span class='kw'>end</span>
|
543
|
+
<span class='kw'>end</span></pre>
|
544
|
+
</td>
|
545
|
+
</tr>
|
546
|
+
</table>
|
547
|
+
</div>
|
548
|
+
|
549
|
+
</div>
|
550
|
+
|
551
|
+
|
552
|
+
<div id="instance_method_details" class="method_details_list">
|
553
|
+
<h2>Instance Method Details</h2>
|
554
|
+
|
555
|
+
|
556
|
+
<div class="method_details first">
|
557
|
+
<h3 class="signature first" id="debug-instance_method">
|
558
|
+
|
559
|
+
#<strong>debug</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
</h3><table class="source_code">
|
566
|
+
<tr>
|
567
|
+
<td>
|
568
|
+
<pre class="lines">
|
569
|
+
|
570
|
+
|
571
|
+
45
|
572
|
+
46
|
573
|
+
47</pre>
|
574
|
+
</td>
|
575
|
+
<td>
|
576
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 45</span>
|
577
|
+
|
578
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
579
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
580
|
+
<span class='kw'>end</span></pre>
|
581
|
+
</td>
|
582
|
+
</tr>
|
583
|
+
</table>
|
584
|
+
</div>
|
585
|
+
|
586
|
+
<div class="method_details ">
|
587
|
+
<h3 class="signature " id="error-instance_method">
|
588
|
+
|
589
|
+
#<strong>error</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
</h3><table class="source_code">
|
596
|
+
<tr>
|
597
|
+
<td>
|
598
|
+
<pre class="lines">
|
599
|
+
|
600
|
+
|
601
|
+
57
|
602
|
+
58
|
603
|
+
59</pre>
|
604
|
+
</td>
|
605
|
+
<td>
|
606
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 57</span>
|
607
|
+
|
608
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
609
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
610
|
+
<span class='kw'>end</span></pre>
|
611
|
+
</td>
|
612
|
+
</tr>
|
613
|
+
</table>
|
614
|
+
</div>
|
615
|
+
|
616
|
+
<div class="method_details ">
|
617
|
+
<h3 class="signature " id="failure-instance_method">
|
618
|
+
|
619
|
+
#<strong>failure</strong>(eventOrMessage, file_name = nil, message = nil, service = nil, error: nil) ⇒ <tt>Object</tt>
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
</h3><div class="docstring">
|
626
|
+
<div class="discussion">
|
627
|
+
|
628
|
+
<p>Logs a failure message to STDOUT, as well as STDERR at info level. If an error was provided, it is logged to STDERR at error level.</p>
|
629
|
+
|
630
|
+
|
631
|
+
</div>
|
632
|
+
</div>
|
633
|
+
<div class="tags">
|
634
|
+
<p class="tag_title">Parameters:</p>
|
635
|
+
<ul class="param">
|
636
|
+
|
637
|
+
<li>
|
638
|
+
|
639
|
+
<span class='name'>eventOrMessage</span>
|
640
|
+
|
641
|
+
|
642
|
+
<span class='type'>(<tt>String</tt>)</span>
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
—
|
647
|
+
<div class='inline'>
|
648
|
+
<p>name of the preservation event which failed, or the message to output if it is the only parameter.</p>
|
649
|
+
</div>
|
650
|
+
|
651
|
+
</li>
|
652
|
+
|
653
|
+
<li>
|
654
|
+
|
655
|
+
<span class='name'>file_name</span>
|
656
|
+
|
657
|
+
|
658
|
+
<span class='type'>(<tt>String</tt>)</span>
|
659
|
+
|
660
|
+
|
661
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
662
|
+
|
663
|
+
|
664
|
+
—
|
665
|
+
<div class='inline'>
|
666
|
+
<p>file name which is the subject of this message.</p>
|
667
|
+
</div>
|
668
|
+
|
669
|
+
</li>
|
670
|
+
|
671
|
+
<li>
|
672
|
+
|
673
|
+
<span class='name'>message</span>
|
674
|
+
|
675
|
+
|
676
|
+
<span class='type'>(<tt>String</tt>)</span>
|
677
|
+
|
678
|
+
|
679
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
680
|
+
|
681
|
+
|
682
|
+
—
|
683
|
+
<div class='inline'>
|
684
|
+
<p>descriptive message to accompany this output</p>
|
685
|
+
</div>
|
686
|
+
|
687
|
+
</li>
|
688
|
+
|
689
|
+
<li>
|
690
|
+
|
691
|
+
<span class='name'>service</span>
|
692
|
+
|
693
|
+
|
694
|
+
<span class='type'>(<tt>String</tt>)</span>
|
695
|
+
|
696
|
+
|
697
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
698
|
+
|
699
|
+
|
700
|
+
—
|
701
|
+
<div class='inline'>
|
702
|
+
<p>name of the service which executed.</p>
|
703
|
+
</div>
|
704
|
+
|
705
|
+
</li>
|
706
|
+
|
707
|
+
<li>
|
708
|
+
|
709
|
+
<span class='name'>error</span>
|
710
|
+
|
711
|
+
|
712
|
+
<span class='type'>(<tt>Error</tt>)</span>
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
—
|
717
|
+
<div class='inline'>
|
718
|
+
<p>error which occurred</p>
|
719
|
+
</div>
|
720
|
+
|
721
|
+
</li>
|
722
|
+
|
723
|
+
</ul>
|
724
|
+
|
725
|
+
|
726
|
+
</div><table class="source_code">
|
727
|
+
<tr>
|
728
|
+
<td>
|
729
|
+
<pre class="lines">
|
730
|
+
|
731
|
+
|
732
|
+
88
|
733
|
+
89
|
734
|
+
90
|
735
|
+
91
|
736
|
+
92
|
737
|
+
93
|
738
|
+
94
|
739
|
+
95</pre>
|
740
|
+
</td>
|
741
|
+
<td>
|
742
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 88</span>
|
743
|
+
|
744
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>error:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
745
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_outcome_text'>outcome_text</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>FAILURE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
|
746
|
+
<span class='ivar'>@stdout_log</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
747
|
+
|
748
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
749
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
750
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
751
|
+
<span class='kw'>end</span></pre>
|
752
|
+
</td>
|
753
|
+
</tr>
|
754
|
+
</table>
|
755
|
+
</div>
|
756
|
+
|
757
|
+
<div class="method_details ">
|
758
|
+
<h3 class="signature " id="fatal-instance_method">
|
759
|
+
|
760
|
+
#<strong>fatal</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
</h3><table class="source_code">
|
767
|
+
<tr>
|
768
|
+
<td>
|
769
|
+
<pre class="lines">
|
770
|
+
|
771
|
+
|
772
|
+
61
|
773
|
+
62
|
774
|
+
63</pre>
|
775
|
+
</td>
|
776
|
+
<td>
|
777
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 61</span>
|
778
|
+
|
779
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
780
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
781
|
+
<span class='kw'>end</span></pre>
|
782
|
+
</td>
|
783
|
+
</tr>
|
784
|
+
</table>
|
785
|
+
</div>
|
786
|
+
|
787
|
+
<div class="method_details ">
|
788
|
+
<h3 class="signature " id="info-instance_method">
|
789
|
+
|
790
|
+
#<strong>info</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
</h3><table class="source_code">
|
797
|
+
<tr>
|
798
|
+
<td>
|
799
|
+
<pre class="lines">
|
800
|
+
|
801
|
+
|
802
|
+
49
|
803
|
+
50
|
804
|
+
51</pre>
|
805
|
+
</td>
|
806
|
+
<td>
|
807
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 49</span>
|
808
|
+
|
809
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
810
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
811
|
+
<span class='kw'>end</span></pre>
|
812
|
+
</td>
|
813
|
+
</tr>
|
814
|
+
</table>
|
815
|
+
</div>
|
816
|
+
|
817
|
+
<div class="method_details ">
|
818
|
+
<h3 class="signature " id="outcome-instance_method">
|
819
|
+
|
820
|
+
#<strong>outcome</strong>(outcome, eventOrMessage, file_name = nil, message = nil, service = nil, error = nil) ⇒ <tt>Object</tt>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
</h3><div class="docstring">
|
827
|
+
<div class="discussion">
|
828
|
+
|
829
|
+
<p>Logs an outcome message to STDOUT, as well as STDERR at info level. If file_name and message are nil, eventOrMessage will be used as the message.</p>
|
830
|
+
|
831
|
+
|
832
|
+
</div>
|
833
|
+
</div>
|
834
|
+
<div class="tags">
|
835
|
+
<p class="tag_title">Parameters:</p>
|
836
|
+
<ul class="param">
|
837
|
+
|
838
|
+
<li>
|
839
|
+
|
840
|
+
<span class='name'>outcome</span>
|
841
|
+
|
842
|
+
|
843
|
+
<span class='type'>(<tt>String</tt>)</span>
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
—
|
848
|
+
<div class='inline'>
|
849
|
+
<p>The status of the outcome. Required.</p>
|
850
|
+
</div>
|
851
|
+
|
852
|
+
</li>
|
853
|
+
|
854
|
+
<li>
|
855
|
+
|
856
|
+
<span class='name'>eventOrMessage</span>
|
857
|
+
|
858
|
+
|
859
|
+
<span class='type'>(<tt>String</tt>)</span>
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
—
|
864
|
+
<div class='inline'>
|
865
|
+
<p>name of the preservation event which was successful, or the message to output if it is the only parameter. Required.</p>
|
866
|
+
</div>
|
867
|
+
|
868
|
+
</li>
|
869
|
+
|
870
|
+
<li>
|
871
|
+
|
872
|
+
<span class='name'>file_name</span>
|
873
|
+
|
874
|
+
|
875
|
+
<span class='type'>(<tt>String</tt>)</span>
|
876
|
+
|
877
|
+
|
878
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
879
|
+
|
880
|
+
|
881
|
+
—
|
882
|
+
<div class='inline'>
|
883
|
+
<p>file name which is the subject of this message.</p>
|
884
|
+
</div>
|
885
|
+
|
886
|
+
</li>
|
887
|
+
|
888
|
+
<li>
|
889
|
+
|
890
|
+
<span class='name'>message</span>
|
891
|
+
|
892
|
+
|
893
|
+
<span class='type'>(<tt>String</tt>)</span>
|
894
|
+
|
895
|
+
|
896
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
897
|
+
|
898
|
+
|
899
|
+
—
|
900
|
+
<div class='inline'>
|
901
|
+
<p>descriptive message to accompany this output</p>
|
902
|
+
</div>
|
903
|
+
|
904
|
+
</li>
|
905
|
+
|
906
|
+
<li>
|
907
|
+
|
908
|
+
<span class='name'>service</span>
|
909
|
+
|
910
|
+
|
911
|
+
<span class='type'>(<tt>String</tt>)</span>
|
912
|
+
|
913
|
+
|
914
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
915
|
+
|
916
|
+
|
917
|
+
—
|
918
|
+
<div class='inline'>
|
919
|
+
<p>name of the service which executed.</p>
|
920
|
+
</div>
|
921
|
+
|
922
|
+
</li>
|
923
|
+
|
924
|
+
<li>
|
925
|
+
|
926
|
+
<span class='name'>error</span>
|
927
|
+
|
928
|
+
|
929
|
+
<span class='type'>(<tt>Error</tt>)</span>
|
930
|
+
|
931
|
+
|
932
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
933
|
+
|
934
|
+
|
935
|
+
—
|
936
|
+
<div class='inline'>
|
937
|
+
<p>error which occurred</p>
|
938
|
+
</div>
|
939
|
+
|
940
|
+
</li>
|
941
|
+
|
942
|
+
</ul>
|
943
|
+
|
944
|
+
|
945
|
+
</div><table class="source_code">
|
946
|
+
<tr>
|
947
|
+
<td>
|
948
|
+
<pre class="lines">
|
949
|
+
|
950
|
+
|
951
|
+
107
|
952
|
+
108
|
953
|
+
109
|
954
|
+
110
|
955
|
+
111</pre>
|
956
|
+
</td>
|
957
|
+
<td>
|
958
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 107</span>
|
959
|
+
|
960
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_outcome'>outcome</span><span class='lparen'>(</span><span class='id identifier rubyid_outcome'>outcome</span><span class='comma'>,</span> <span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
961
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_outcome_text'>outcome_text</span><span class='lparen'>(</span><span class='id identifier rubyid_outcome'>outcome</span><span class='comma'>,</span> <span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
|
962
|
+
<span class='ivar'>@stdout_log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
963
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
964
|
+
<span class='kw'>end</span></pre>
|
965
|
+
</td>
|
966
|
+
</tr>
|
967
|
+
</table>
|
968
|
+
</div>
|
969
|
+
|
970
|
+
<div class="method_details ">
|
971
|
+
<h3 class="signature " id="outcome_text-instance_method">
|
972
|
+
|
973
|
+
#<strong>outcome_text</strong>(outcome, eventOrMessage, file_name = nil, message = nil, service = nil, error = nil) ⇒ <tt>Object</tt> <span class="extras">(private)</span>
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
|
979
|
+
</h3><table class="source_code">
|
980
|
+
<tr>
|
981
|
+
<td>
|
982
|
+
<pre class="lines">
|
983
|
+
|
984
|
+
|
985
|
+
114
|
986
|
+
115
|
987
|
+
116
|
988
|
+
117
|
989
|
+
118
|
990
|
+
119
|
991
|
+
120
|
992
|
+
121
|
993
|
+
122
|
994
|
+
123
|
995
|
+
124
|
996
|
+
125
|
997
|
+
126
|
998
|
+
127
|
999
|
+
128
|
1000
|
+
129</pre>
|
1001
|
+
</td>
|
1002
|
+
<td>
|
1003
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 114</span>
|
1004
|
+
|
1005
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_outcome_text'>outcome_text</span><span class='lparen'>(</span><span class='id identifier rubyid_outcome'>outcome</span><span class='comma'>,</span> <span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1006
|
+
<span class='id identifier rubyid_message_only'>message_only</span> <span class='op'>=</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1007
|
+
|
1008
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_outcome'>outcome</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1009
|
+
|
1010
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_message_only'>message_only</span>
|
1011
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1012
|
+
<span class='kw'>else</span>
|
1013
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1014
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_service'>service</span><span class='embexpr_end'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1015
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file_name'>file_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1016
|
+
<span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>||</span> <span class='id identifier rubyid_error'>error</span><span class='op'>&.</span><span class='id identifier rubyid_message'>message</span>
|
1017
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</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_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_msg'>msg</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1018
|
+
<span class='kw'>end</span>
|
1019
|
+
<span class='id identifier rubyid_text'>text</span>
|
1020
|
+
<span class='kw'>end</span></pre>
|
1021
|
+
</td>
|
1022
|
+
</tr>
|
1023
|
+
</table>
|
1024
|
+
</div>
|
1025
|
+
|
1026
|
+
<div class="method_details ">
|
1027
|
+
<h3 class="signature " id="success-instance_method">
|
1028
|
+
|
1029
|
+
#<strong>success</strong>(eventOrMessage, file_name = nil, message = nil, service = nil) ⇒ <tt>Object</tt>
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
</h3><div class="docstring">
|
1036
|
+
<div class="discussion">
|
1037
|
+
|
1038
|
+
<p>Logs a success message to STDOUT, as well as STDERR at info level.</p>
|
1039
|
+
|
1040
|
+
|
1041
|
+
</div>
|
1042
|
+
</div>
|
1043
|
+
<div class="tags">
|
1044
|
+
<p class="tag_title">Parameters:</p>
|
1045
|
+
<ul class="param">
|
1046
|
+
|
1047
|
+
<li>
|
1048
|
+
|
1049
|
+
<span class='name'>eventOrMessage</span>
|
1050
|
+
|
1051
|
+
|
1052
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1053
|
+
|
1054
|
+
|
1055
|
+
|
1056
|
+
—
|
1057
|
+
<div class='inline'>
|
1058
|
+
<p>name of the preservation event which succeeded, or the message to output if it is the only parameter. Required.</p>
|
1059
|
+
</div>
|
1060
|
+
|
1061
|
+
</li>
|
1062
|
+
|
1063
|
+
<li>
|
1064
|
+
|
1065
|
+
<span class='name'>file_name</span>
|
1066
|
+
|
1067
|
+
|
1068
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1069
|
+
|
1070
|
+
|
1071
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1072
|
+
|
1073
|
+
|
1074
|
+
—
|
1075
|
+
<div class='inline'>
|
1076
|
+
<p>file name which is the subject of this message.</p>
|
1077
|
+
</div>
|
1078
|
+
|
1079
|
+
</li>
|
1080
|
+
|
1081
|
+
<li>
|
1082
|
+
|
1083
|
+
<span class='name'>message</span>
|
1084
|
+
|
1085
|
+
|
1086
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1087
|
+
|
1088
|
+
|
1089
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1090
|
+
|
1091
|
+
|
1092
|
+
—
|
1093
|
+
<div class='inline'>
|
1094
|
+
<p>descriptive message to accompany this output</p>
|
1095
|
+
</div>
|
1096
|
+
|
1097
|
+
</li>
|
1098
|
+
|
1099
|
+
<li>
|
1100
|
+
|
1101
|
+
<span class='name'>service</span>
|
1102
|
+
|
1103
|
+
|
1104
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1105
|
+
|
1106
|
+
|
1107
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1108
|
+
|
1109
|
+
|
1110
|
+
—
|
1111
|
+
<div class='inline'>
|
1112
|
+
<p>name of the service which executed.</p>
|
1113
|
+
</div>
|
1114
|
+
|
1115
|
+
</li>
|
1116
|
+
|
1117
|
+
</ul>
|
1118
|
+
|
1119
|
+
|
1120
|
+
</div><table class="source_code">
|
1121
|
+
<tr>
|
1122
|
+
<td>
|
1123
|
+
<pre class="lines">
|
1124
|
+
|
1125
|
+
|
1126
|
+
76
|
1127
|
+
77
|
1128
|
+
78</pre>
|
1129
|
+
</td>
|
1130
|
+
<td>
|
1131
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 76</span>
|
1132
|
+
|
1133
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1134
|
+
<span class='id identifier rubyid_outcome'>outcome</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>SUCCESS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_eventOrMessage'>eventOrMessage</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_service'>service</span><span class='rparen'>)</span>
|
1135
|
+
<span class='kw'>end</span></pre>
|
1136
|
+
</td>
|
1137
|
+
</tr>
|
1138
|
+
</table>
|
1139
|
+
</div>
|
1140
|
+
|
1141
|
+
<div class="method_details ">
|
1142
|
+
<h3 class="signature " id="unknown-instance_method">
|
1143
|
+
|
1144
|
+
#<strong>unknown</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
1145
|
+
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
</h3><table class="source_code">
|
1151
|
+
<tr>
|
1152
|
+
<td>
|
1153
|
+
<pre class="lines">
|
1154
|
+
|
1155
|
+
|
1156
|
+
65
|
1157
|
+
66
|
1158
|
+
67</pre>
|
1159
|
+
</td>
|
1160
|
+
<td>
|
1161
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 65</span>
|
1162
|
+
|
1163
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_unknown'>unknown</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1164
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_unknown'>unknown</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1165
|
+
<span class='kw'>end</span></pre>
|
1166
|
+
</td>
|
1167
|
+
</tr>
|
1168
|
+
</table>
|
1169
|
+
</div>
|
1170
|
+
|
1171
|
+
<div class="method_details ">
|
1172
|
+
<h3 class="signature " id="warn-instance_method">
|
1173
|
+
|
1174
|
+
#<strong>warn</strong>(progname = nil, &block) ⇒ <tt>Object</tt>
|
1175
|
+
|
1176
|
+
|
1177
|
+
|
1178
|
+
|
1179
|
+
|
1180
|
+
</h3><table class="source_code">
|
1181
|
+
<tr>
|
1182
|
+
<td>
|
1183
|
+
<pre class="lines">
|
1184
|
+
|
1185
|
+
|
1186
|
+
53
|
1187
|
+
54
|
1188
|
+
55</pre>
|
1189
|
+
</td>
|
1190
|
+
<td>
|
1191
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/logging/redirecting_logger.rb', line 53</span>
|
1192
|
+
|
1193
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1194
|
+
<span class='ivar'>@stderr_log</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1195
|
+
<span class='kw'>end</span></pre>
|
1196
|
+
</td>
|
1197
|
+
</tr>
|
1198
|
+
</table>
|
1199
|
+
</div>
|
1200
|
+
|
1201
|
+
</div>
|
1202
|
+
|
1203
|
+
</div>
|
1204
|
+
|
1205
|
+
<div id="footer">
|
1206
|
+
Generated on Tue May 28 15:48:01 2019 by
|
1207
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1208
|
+
0.9.19 (ruby-2.6.3).
|
1209
|
+
</div>
|
1210
|
+
|
1211
|
+
</div>
|
1212
|
+
</body>
|
1213
|
+
</html>
|