@stonyx/logs 1.0.1-alpha.19 → 1.0.1-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -232,8 +232,8 @@ your handler, or it prints twice.
|
|
|
232
232
|
> For the recoverable directory-level codes -- `ENOENT`, `EACCES`, `EPERM`, `EROFS` -- **Log** has
|
|
233
233
|
> already retried internally by the time the rejection reaches you (see
|
|
234
234
|
> [self-healing retry](#self-healing-retry) below), so that retry ran and failed too. Every other
|
|
235
|
-
> code -- `EISDIR`, `ENOTDIR` and `ENOSPC` among them -- is
|
|
236
|
-
> help it. Either way a consumer-side retry layer races the internal self-heal or repeats a call that
|
|
235
|
+
> code -- `EISDIR`, `ENOTDIR` and `ENOSPC` among them -- is not itself retried, because a retry
|
|
236
|
+
> cannot help it. Either way a consumer-side retry layer races the internal self-heal or repeats a call that
|
|
237
237
|
> already cannot succeed, and only delays the disable or back-off that your error path exists to
|
|
238
238
|
> trigger.
|
|
239
239
|
>
|
|
@@ -307,8 +307,9 @@ re-arm above, which is what makes a recovery notice reachable at all.
|
|
|
307
307
|
A cached log directory can outlive the directory it describes - for example, something deletes
|
|
308
308
|
`logs/` while your process is running. To cover that, a failure whose `err.code` is `ENOENT`,
|
|
309
309
|
`EACCES`, `EPERM` or `EROFS` drops the cached directory entry and retries the write **exactly once**.
|
|
310
|
-
Any other code -- `EISDIR`, `ENOTDIR`, `ENOSPC`, `EMFILE` and the rest --
|
|
311
|
-
attempt,
|
|
310
|
+
Any other code -- `EISDIR`, `ENOTDIR`, `ENOSPC`, `EMFILE` and the rest -- does not itself trigger
|
|
311
|
+
a retry. The decision is keyed on the *first* attempt's code, so a rejection carrying one of these
|
|
312
|
+
can still arrive after a retry if conditions changed mid-call.
|
|
312
313
|
|
|
313
314
|
A retry that succeeds emits no *failure* notice: the promise resolves normally and the write counts
|
|
314
315
|
as a success, closing any failure episode already open for that directory with the usual
|
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,8 @@ export default class Log {
|
|
|
106
106
|
* stderr notice emitted alongside a failure is informational only and is deduped per episode.
|
|
107
107
|
*
|
|
108
108
|
* On `ENOENT`, `EACCES`, `EPERM` or `EROFS` the cached directory entry is dropped and the write
|
|
109
|
-
* is retried exactly once
|
|
109
|
+
* is retried exactly once. Other codes do not themselves trigger a retry; the decision is keyed
|
|
110
|
+
* on the first attempt's code.
|
|
110
111
|
*
|
|
111
112
|
* A rejection is terminal either way. For those four codes the self-heal has already run and
|
|
112
113
|
* failed by the time one escapes; the rest were never retryable, so repeating the call cannot
|
package/dist/index.js
CHANGED
|
@@ -155,7 +155,8 @@ export default class Log {
|
|
|
155
155
|
* stderr notice emitted alongside a failure is informational only and is deduped per episode.
|
|
156
156
|
*
|
|
157
157
|
* On `ENOENT`, `EACCES`, `EPERM` or `EROFS` the cached directory entry is dropped and the write
|
|
158
|
-
* is retried exactly once
|
|
158
|
+
* is retried exactly once. Other codes do not themselves trigger a retry; the decision is keyed
|
|
159
|
+
* on the first attempt's code.
|
|
159
160
|
*
|
|
160
161
|
* A rejection is terminal either way. For those four codes the self-heal has already run and
|
|
161
162
|
* failed by the time one escapes; the rest were never retryable, so repeating the call cannot
|