@effectstream/log 0.103.0 → 0.103.2
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 +11 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -72,12 +72,22 @@ powers the orchestrator's per-component log views.
|
|
|
72
72
|
- `log.remote(...)`: console + OpenTelemetry log record. Same signature as `local`.
|
|
73
73
|
- `log.remoteForce(...)` is `remote` without level filtering.
|
|
74
74
|
- `log.formatMessage(...)` - the formatter used internally; useful for custom transports.
|
|
75
|
-
- `defaultOtelSetup(
|
|
75
|
+
- `defaultOtelSetup(name, version)`: one-call OpenTelemetry SDK setup with sensible defaults. Takes two positional strings, not an options object.
|
|
76
76
|
- `attachTransport(transport)` registers a custom tslog transport (e.g. ship logs to a file).
|
|
77
77
|
- `SeverityNumber`: re-export of OpenTelemetry severity levels.
|
|
78
78
|
- `ComponentNames`: string-enum constants used to tag logs by component.
|
|
79
|
+
- `LaunchableComponents`: the subset of `ComponentNames` the orchestrator can launch (`ComponentNames` is this plus the secondary components).
|
|
79
80
|
- `Namespace`: `string | string[]` for log namespacing.
|
|
80
81
|
|
|
82
|
+
## Environment variables
|
|
83
|
+
|
|
84
|
+
Two variables change this package's behaviour:
|
|
85
|
+
|
|
86
|
+
| Name | Effect |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `EFFECTSTREAM_LOG_LEVEL` | Minimum severity to emit, matched case-insensitively against the OpenTelemetry `SeverityNumber` names (`TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`). Defaults to `INFO`; an unrecognised value falls back to `INFO` rather than erroring. |
|
|
89
|
+
| `EFFECTSTREAM_ORCHESTRATOR` | Set by the orchestrator when it launches a process. When present, both the local and remote loggers switch to the orchestrator's structured transport so the TUI can group output per component, instead of writing formatted lines and OpenTelemetry records. |
|
|
90
|
+
|
|
81
91
|
## Examples
|
|
82
92
|
|
|
83
93
|
Runnable: [`test/examples.test.ts`](./test/examples.test.ts).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effectstream/log",
|
|
3
|
-
"version": "0.103.
|
|
3
|
+
"version": "0.103.2",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"homepage": "https://effectstream.github.io/docs/",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"exports": "./src/mod.ts",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@effectstream/utils": "0.103.
|
|
16
|
+
"@effectstream/utils": "0.103.2",
|
|
17
17
|
"@opentelemetry/api": "^1.9.0",
|
|
18
18
|
"@opentelemetry/api-logs": "0.56.0",
|
|
19
19
|
"@opentelemetry/exporter-logs-otlp-http": "0.56.0",
|