@webex/plugin-logger 3.12.0-next.56 → 3.12.0-next.58
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/.repo-context.json +389 -0
- package/.sdd/manifest.json +334 -0
- package/AGENTS.md +175 -0
- package/dist/logger.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +76 -0
- package/docs/adr/index.md +18 -0
- package/docs/architecture.md +252 -0
- package/docs/getting-started.md +88 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +65 -0
- package/package.json +2 -2
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +320 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Architecture
|
|
3
|
+
title: '@webex/plugin-logger architecture'
|
|
4
|
+
description: Package-wide boundaries, resources, interactions, dependencies, and cross-cutting architecture.
|
|
5
|
+
tags: [architecture]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: architecture@0.3.0
|
|
10
|
+
generated_by: claude-cowork
|
|
11
|
+
approved_by: akulakum@cisco.com
|
|
12
|
+
updated_at: 2026-10-08T08:51:39Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# @webex/plugin-logger architecture
|
|
17
|
+
|
|
18
|
+
Canonical architecture for this package. Logger behavior lives in the [module specification](../src/docs/README.md). This page owns package boundaries, the plugin registration, the published contract, and how logs leave the package.
|
|
19
|
+
|
|
20
|
+
Related context: [specification registry](specs/README.md) · [package agent instructions](../AGENTS.md)
|
|
21
|
+
|
|
22
|
+
## Applicability
|
|
23
|
+
|
|
24
|
+
| Condition ID | Status | Evidence or reason | Owned section |
|
|
25
|
+
| ------------ | ------ | ------------------ | ------------- |
|
|
26
|
+
| `repo.owns_datastore` | N/A | No database, file store, or migration in `src/` | Repository data and schema |
|
|
27
|
+
| `repo.holds_client_state` | Applicable | `Logger` keeps three in-memory buffers and a group counter as session state | Client state model |
|
|
28
|
+
| `repo.components_interact` | Applicable | `src/index.js` registers `src/logger.js` with `src/config.js` through `@webex/webex-core` | Dependency and interaction topology |
|
|
29
|
+
| `repo.domain_data_across_components` | N/A | One plugin owns the buffers. No shared domain record. | Object and data ownership |
|
|
30
|
+
| `repo.caches_data` | N/A | Buffers are bounded history, not a cache of fetched data | Caching catalog |
|
|
31
|
+
| `repo.observability_convention` | Applicable | This package is the SDK logging convention: levels, names, redaction, and buffered upload | Observability patterns |
|
|
32
|
+
| `repo.deploys_to_infra` | N/A | Library published to npm. No service runtime. | Runtime and infrastructure |
|
|
33
|
+
| `repo.shared_base_libs` | Applicable | `@webex/webex-core`, `@webex/common`, and `lodash` are runtime dependencies | Shared and base libraries |
|
|
34
|
+
| `repo.is_monorepo` | N/A | This SDD root is one package. The workspace around it is out of scope. | Package map and inter-package dependencies |
|
|
35
|
+
| `repo.multi_platform` | Applicable | `inBrowser` switches console output; tests run under jest (Node) and karma (browser) | Platform matrix |
|
|
36
|
+
| `repo.published_package` | Applicable | `package.json` `name` is `@webex/plugin-logger` and `deploy:npm` publishes it | Release and versioning |
|
|
37
|
+
| `repo.embedded_in_host` | N/A | No host theme or embed API | Host integration and theming |
|
|
38
|
+
| `repo.exposes_commands_or_artifacts` | Applicable | `build:src` writes `dist/`; `formatLogs` produces the upload text | Commands and generated artifacts |
|
|
39
|
+
| `repo.cross_repo_deps_material` | Applicable | Behavior depends on sibling workspace packages outside this SDD root | Cross-repository topology |
|
|
40
|
+
| `repo.security_arch_warranted` | Applicable | Redaction keeps tokens and personal data out of console and uploaded logs | Security architecture |
|
|
41
|
+
|
|
42
|
+
## Design overview
|
|
43
|
+
|
|
44
|
+
`@webex/plugin-logger` is a published library with one module. Importing it registers `Logger` as the `logger` child of every webex instance, replacing the minimal logger that `@webex/webex-core` registers in `src/plugins/logger.js`. Callers use `webex.logger.<level>()` for SDK logs and `webex.logger.client_<level>()` for client logs.
|
|
45
|
+
|
|
46
|
+
Each call decides printing and buffering separately, redacts a deep clone of the arguments, prints through `console`, and appends to a bounded buffer. `@webex/internal-plugin-support` later reads the buffer through `formatLogs` and uploads it.
|
|
47
|
+
|
|
48
|
+
The package does not start a server, open a network connection, or persist data.
|
|
49
|
+
|
|
50
|
+
## Resource inventory and responsibilities
|
|
51
|
+
|
|
52
|
+
| Resource | Kind | Responsibility | Owner | Source | Detailed specification |
|
|
53
|
+
| -------- | ---- | -------------- | ----- | ------ | ---------------------- |
|
|
54
|
+
| Logger plugin module | module | Levels, redaction, buffers, formatting | @webex/web-client, @webex/web-sdk | `src/` | `src/docs/README.md` |
|
|
55
|
+
| Published package | package | npm entry points and registration side effect | @webex/web-client, @webex/web-sdk | `package.json` | `docs/architecture.md` |
|
|
56
|
+
|
|
57
|
+
## Interaction and execution flows
|
|
58
|
+
|
|
59
|
+
```mermaid
|
|
60
|
+
flowchart LR
|
|
61
|
+
importer[Package importer]
|
|
62
|
+
index[src_index_js]
|
|
63
|
+
core[webex_core_registerPlugin]
|
|
64
|
+
logger[src_logger_js]
|
|
65
|
+
config[src_config_js]
|
|
66
|
+
plugins[SDK plugins]
|
|
67
|
+
support[internal_plugin_support]
|
|
68
|
+
consoleOut[console]
|
|
69
|
+
importer --> index
|
|
70
|
+
index --> core
|
|
71
|
+
index --> logger
|
|
72
|
+
index --> config
|
|
73
|
+
plugins --> logger
|
|
74
|
+
logger --> consoleOut
|
|
75
|
+
support --> logger
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
|
|
79
|
+
| ---- | -- | ------------------------ | ------- | --------------------------------- |
|
|
80
|
+
| Importer | `src/index.js` | package import | Side-effect registration | Without the import, `webex.logger` stays the webex-core fallback |
|
|
81
|
+
| `src/index.js` | `@webex/webex-core` `registerPlugin` | in-process call with `replace: true` and `config` | Install `Logger` and merge defaults | Without `replace`, registration is skipped |
|
|
82
|
+
| SDK plugins | `webex.logger` | synchronous method call | Write logs | Methods never throw |
|
|
83
|
+
| `webex.logger` | `console` | synchronous call with fallbacks | Developer output | Missing console methods fall back |
|
|
84
|
+
| `@webex/internal-plugin-support` | `webex.logger` | `formatLogs`, `updateLastSubmittedIndex`, `resetBufferToLastSuccessfulUpload` | Upload logs | A failed diff upload rewinds `nextIndex` when retry is configured |
|
|
85
|
+
|
|
86
|
+
## Dependency topology
|
|
87
|
+
|
|
88
|
+
Runtime dependencies declared in `package.json` and imported from `src/`:
|
|
89
|
+
|
|
90
|
+
| Dependency | Role |
|
|
91
|
+
| ---------- | ---- |
|
|
92
|
+
| `@webex/webex-core` | `WebexPlugin` base class and `registerPlugin` |
|
|
93
|
+
| `@webex/common` | `inBrowser` and `patterns` |
|
|
94
|
+
| `lodash@^4.17.21` | `cloneDeep`, `has`, `isArray`, `isObject`, `isString` |
|
|
95
|
+
|
|
96
|
+
`@webex/test-helper-chai`, `@webex/test-helper-mocha`, and `@webex/test-helper-mock-webex` are also listed under `dependencies`, but only `test/` imports them.
|
|
97
|
+
|
|
98
|
+
## Public and consumer surfaces
|
|
99
|
+
|
|
100
|
+
| Contract id | Publication | Kind | Canonical source | Owning spec |
|
|
101
|
+
| ----------- | ----------- | ---- | ---------------- | ----------- |
|
|
102
|
+
| `plugin-logger-sdk` | published | sdk | `package.json` | `src/docs/README.md` |
|
|
103
|
+
| `log-buffer-format` | internal | file | `src/logger.js` | `src/docs/README.md` |
|
|
104
|
+
| `webex-core-plugin-host` | internal | rpc | `@webex/webex-core` | external |
|
|
105
|
+
| `webex-common-js-api` | published | sdk | `@webex/common` | `packages/@webex/common/src/docs/README.md` |
|
|
106
|
+
| `lodash` | published | sdk | npm package `lodash` | external |
|
|
107
|
+
|
|
108
|
+
`plugin-logger-sdk` entry points:
|
|
109
|
+
|
|
110
|
+
- `main`: `dist/index.js`
|
|
111
|
+
- `devMain`: `src/index.js`
|
|
112
|
+
- exports: default `Logger` and named `levels`
|
|
113
|
+
|
|
114
|
+
No HTTP surface exists, so `api-specs/openapi.yaml` is omitted.
|
|
115
|
+
|
|
116
|
+
Known in-repo consumers: `packages/@webex/internal-plugin-support/src/support.js` uses `formatLogs` and both cursor methods. `packages/webex/src/webex.js`, `packages/webex-node/src/webex-node.js`, and `packages/@webex/contact-center/src/webex.js` import the package for registration.
|
|
117
|
+
|
|
118
|
+
## Client state model
|
|
119
|
+
|
|
120
|
+
| State or slice | Owner | Transition triggers | Persistence or reset boundary |
|
|
121
|
+
| -------------- | ----- | ------------------- | ----------------------------- |
|
|
122
|
+
| Log buffers (`buffer`, `sdkBuffer`, `clientBuffer`) | `Logger` | Buffered log calls; trimming at history length | In memory per webex instance. Lost on reload. |
|
|
123
|
+
| Upload cursors (`nextIndex`, `lastSubmitted`) | `Logger`, driven by `@webex/internal-plugin-support` | `formatLogs({diff: true})`, `updateLastSubmittedIndex`, `resetBufferToLastSuccessfulUpload` | In memory. Clamped at `0` when entries are trimmed. |
|
|
124
|
+
| `groupLevel` | `Logger` | Buffered `group` and `groupEnd` | In memory |
|
|
125
|
+
|
|
126
|
+
Details are in the module spec.
|
|
127
|
+
|
|
128
|
+
## Cross-cutting architecture
|
|
129
|
+
|
|
130
|
+
### Security
|
|
131
|
+
|
|
132
|
+
The trust boundary is the point where caller-supplied values leave the process: the console and the upload buffer. Every log method crosses it only through `Logger#filter`. The controls and their gaps are listed under Security architecture.
|
|
133
|
+
|
|
134
|
+
The package does not authenticate users, store secrets, or verify certificates.
|
|
135
|
+
|
|
136
|
+
### Observability and operations
|
|
137
|
+
|
|
138
|
+
This package is the SDK's logging layer; its signal conventions are under Observability patterns. Operationally, it has no runtime to deploy or monitor. A failure inside a log method is reported through `console.warn` with `failed to execute Logger#<level>` and does not reach the caller.
|
|
139
|
+
|
|
140
|
+
### Quality attributes
|
|
141
|
+
|
|
142
|
+
- Compatibility: level method names, `formatLogs`, the cursor methods, and the `config.logger` keys are relied on by workspace packages.
|
|
143
|
+
- Bounded memory: each buffer is trimmed to its history length on write.
|
|
144
|
+
- Non-throwing: log methods catch internal errors.
|
|
145
|
+
|
|
146
|
+
## Dependency and interaction topology
|
|
147
|
+
|
|
148
|
+
One module. Files inside it:
|
|
149
|
+
|
|
150
|
+
```mermaid
|
|
151
|
+
flowchart TD
|
|
152
|
+
indexJs[src_index_js]
|
|
153
|
+
loggerJs[src_logger_js]
|
|
154
|
+
configJs[src_config_js]
|
|
155
|
+
indexJs --> loggerJs
|
|
156
|
+
indexJs --> configJs
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`src/config.js` is not imported by `src/logger.js`. It reaches the logger as `this.config` after `registerPlugin` merges it.
|
|
160
|
+
|
|
161
|
+
## Observability patterns
|
|
162
|
+
|
|
163
|
+
| Signal | Convention or required fields | Propagation or naming rule | Primary evidence |
|
|
164
|
+
| ------ | ----------------------------- | -------------------------- | ---------------- |
|
|
165
|
+
| Logs | Buffer entry `[indent, isoTimestamp, name, ...values]`, redacted before output | SDK name `wx-js-sdk`; client name from `config.logger.clientName`, default `client` | `src/logger.js` |
|
|
166
|
+
| Metrics | N/A — none emitted | — | `src/logger.js` |
|
|
167
|
+
| Traces | N/A — `trace` is a log level, not a span | — | `src/logger.js` |
|
|
168
|
+
| Audit | N/A — no audited actions | — | `src/logger.js` |
|
|
169
|
+
|
|
170
|
+
## Shared and base libraries
|
|
171
|
+
|
|
172
|
+
| Inherited stack | What this package inherits | Source |
|
|
173
|
+
| --------------- | -------------------------- | ------ |
|
|
174
|
+
| `WebexPlugin` base class | Ampersand session state, `this.config` bound to `config.logger`, and the `this.webex` reference | `src/logger.js` |
|
|
175
|
+
| Legacy build and lint configs | `@webex/babel-config-legacy`, `@webex/eslint-config-legacy`, `@webex/jest-config-legacy` | `babel.config.js`, `.eslintrc.js`, `jest.config.js` |
|
|
176
|
+
| Legacy tooling | `webex-legacy-tools` build and test runners | `package.json` scripts |
|
|
177
|
+
|
|
178
|
+
## Platform matrix
|
|
179
|
+
|
|
180
|
+
| Platform | Console output | Test runner |
|
|
181
|
+
| -------- | -------------- | ----------- |
|
|
182
|
+
| Node | Filtered arguments, objects as objects | jest via `test:unit` |
|
|
183
|
+
| Browser | Stringified arguments, objects as JSON strings | karma via `test:browser` |
|
|
184
|
+
|
|
185
|
+
`inBrowser` comes from `@webex/common` and is resolved by the bundler through that package's `browser` field.
|
|
186
|
+
|
|
187
|
+
## Release and versioning
|
|
188
|
+
|
|
189
|
+
The package is published with `yarn workspace @webex/plugin-logger deploy:npm`. That script wraps Yarn's npm publish; the wrapped call is a script internal, not a separate manifest command. The license field is `MIT`. There is no package-local changelog; workspace release tooling owns changelog generation.
|
|
190
|
+
|
|
191
|
+
Export stability is described in the module spec.
|
|
192
|
+
|
|
193
|
+
## Commands and generated artifacts
|
|
194
|
+
|
|
195
|
+
| Command | Produces |
|
|
196
|
+
| ------- | -------- |
|
|
197
|
+
| `yarn workspace @webex/plugin-logger build` | `dist/` from `src/` via `build:src` |
|
|
198
|
+
| `yarn workspace @webex/plugin-logger build:src` | `dist/` with source maps |
|
|
199
|
+
| `yarn workspace @webex/plugin-logger test:unit` | jest result; no committed artifact |
|
|
200
|
+
| `yarn workspace @webex/plugin-logger test:browser` | karma result; no committed artifact |
|
|
201
|
+
| `yarn workspace @webex/plugin-logger test:style` | eslint result; no committed artifact |
|
|
202
|
+
| `yarn install` | workspace `node_modules` |
|
|
203
|
+
| `yarn workspace @webex/plugin-logger deploy:npm` | npm publish |
|
|
204
|
+
|
|
205
|
+
At runtime, `formatLogs()` produces the log text described under Protocol and wire format in the module spec. `dist/` is generated. Do not edit it by hand.
|
|
206
|
+
|
|
207
|
+
## Cross-repository topology
|
|
208
|
+
|
|
209
|
+
| Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
|
|
210
|
+
| ----------------------------- | ------------ | ------------------------------ | ----- | --------------------- |
|
|
211
|
+
| `packages/@webex/webex-core` | Consumes | `webex-core-plugin-host` | @webex/web-client, @webex/web-sdk | webex-core must register its fallback logger first so `replace: true` can override it |
|
|
212
|
+
| `packages/@webex/common` | Consumes | `webex-common-js-api` | @webex/web-client, @webex/web-sdk | Changes to `patterns.containsEmails` or `containsMTID` change redaction here |
|
|
213
|
+
| `packages/@webex/internal-plugin-support` | Provides | `log-buffer-format` and cursor methods | @webex/web-client, @webex/web-sdk | Buffer or format changes must ship with support changes |
|
|
214
|
+
|
|
215
|
+
These are sibling workspace packages outside this package-scoped SDD root.
|
|
216
|
+
|
|
217
|
+
## Security architecture
|
|
218
|
+
|
|
219
|
+
Threat addressed: tokens and personal data written to the console or included in uploaded logs.
|
|
220
|
+
|
|
221
|
+
Controls in `src/logger.js`:
|
|
222
|
+
|
|
223
|
+
- Deep clone before redaction, so caller objects are not mutated.
|
|
224
|
+
- Removal of keys matching `/[Aa]uthorization/` at any depth.
|
|
225
|
+
- Replacement of email addresses with `[REDACTED]`.
|
|
226
|
+
- Replacement of `MTID=<value>` with `MTID=[REDACTED]`.
|
|
227
|
+
- Circular-reference guard during redaction and stringify.
|
|
228
|
+
|
|
229
|
+
Controls that are absent:
|
|
230
|
+
|
|
231
|
+
- `Error` arguments are passed through without redaction.
|
|
232
|
+
- Uppercase `AUTHORIZATION` keys are not removed.
|
|
233
|
+
- Repeated identical strings within one call are redacted only at their first occurrence.
|
|
234
|
+
|
|
235
|
+
## Domain language
|
|
236
|
+
|
|
237
|
+
| Term | Meaning |
|
|
238
|
+
| ---- | ------- |
|
|
239
|
+
| SDK log | Entry written by `<level>()`; named `wx-js-sdk` |
|
|
240
|
+
| Client log | Entry written by `client_<level>()`; named by `config.logger.clientName` or `client` |
|
|
241
|
+
| Buffer | In-memory array of entries kept for upload |
|
|
242
|
+
| Diff | Entries added since the last `formatLogs({diff: true})` |
|
|
243
|
+
| `nextIndex` | Position where the next diff starts |
|
|
244
|
+
| `lastSubmitted` | `nextIndex` at the last successful upload |
|
|
245
|
+
| Redaction | Removing or masking sensitive values before output |
|
|
246
|
+
|
|
247
|
+
## References and maintenance
|
|
248
|
+
|
|
249
|
+
- Module spec: `src/docs/README.md`
|
|
250
|
+
- Product readme decision: `docs/adr/0001-retain-product-readme.md`
|
|
251
|
+
- Owner: `@webex/web-client @webex/web-sdk` in the monorepo `.github/CODEOWNERS`
|
|
252
|
+
- Manifest: `.sdd/manifest.json`
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Getting Started
|
|
3
|
+
title: Getting started
|
|
4
|
+
description: Local setup, build, run, and test routing for @webex/plugin-logger.
|
|
5
|
+
tags: [onboarding]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: getting-started@0.3.0
|
|
10
|
+
generated_by: claude-cowork
|
|
11
|
+
approved_by: akulakum@cisco.com
|
|
12
|
+
updated_at: 2026-10-08T08:51:39Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Getting started
|
|
17
|
+
|
|
18
|
+
Onboarding for **@webex/plugin-logger**.
|
|
19
|
+
|
|
20
|
+
The unit spec is `test/unit/spec/logger.js`. `test:unit` runs it under jest in Node, and `test:browser` runs it under karma.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
| Tool or access | Version or requirement |
|
|
25
|
+
| -------------- | ---------------------- |
|
|
26
|
+
| Node.js | `>=18`, declared in `package.json` `engines` |
|
|
27
|
+
| Yarn | Workspaces are used, so install from the workspace root rather than this directory |
|
|
28
|
+
| Browser for `test:browser` | A local browser for the karma runner that `test:browser` starts through `@webex/legacy-tools` |
|
|
29
|
+
| Container, registry, VPN, or account | N/A — no external account is required to build, lint, or unit-test this package |
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
Dependencies are resolved for the whole workspace, not per package:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
yarn install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Run it from the workspace root.
|
|
40
|
+
|
|
41
|
+
## Build
|
|
42
|
+
|
|
43
|
+
Compile sources to `dist/`:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
yarn workspace @webex/plugin-logger build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`scripts.build` runs `build:src`, which uses the `@webex/legacy-tools` builder to compile `src/` into `dist/` with source maps. That builder call is a script internal. The manifest records `build:src` as the compile role and `build` as the package role.
|
|
50
|
+
|
|
51
|
+
## Run
|
|
52
|
+
|
|
53
|
+
N/A — library package with no start script.
|
|
54
|
+
|
|
55
|
+
Import the package from a consumer. `webex` and `webex-node` import it so that `webex.logger` is this plugin.
|
|
56
|
+
|
|
57
|
+
## Tests
|
|
58
|
+
|
|
59
|
+
| Tier | Command | What it covers |
|
|
60
|
+
| ---- | ------- | -------------- |
|
|
61
|
+
| Unit (Node) | `yarn workspace @webex/plugin-logger test:unit` | `test/unit/spec/logger.js` under jest, including `nodeOnly` cases |
|
|
62
|
+
| Unit (browser) | `yarn workspace @webex/plugin-logger test:browser` | The same spec under karma, including `browserOnly` cases. Recorded as manifest `commands.browser-test` (role `other`) because the SDD manifest `tests` schema has no browser tier (`unit`, `integration`, `e2e`, `qa` only). |
|
|
63
|
+
| Lint | `yarn workspace @webex/plugin-logger test:style` | eslint over `src/` |
|
|
64
|
+
| Integration | N/A — `package.json` does not define `test:integration` | — |
|
|
65
|
+
|
|
66
|
+
Do not use `package.json` `scripts.test` as a verification command. It chains `test:integration`, which is not defined.
|
|
67
|
+
|
|
68
|
+
## Configuration and secrets
|
|
69
|
+
|
|
70
|
+
| Item | Where it lives |
|
|
71
|
+
| ---- | -------------- |
|
|
72
|
+
| `WEBEX_LOG_LEVEL` | Environment variable. Read once into `config.logger.level` by `src/config.js` and again on each call by `getCurrentLevel` in `src/logger.js`. |
|
|
73
|
+
| `NODE_ENV` | `test` forces level `trace` when no level is configured and enables test-only output tweaks |
|
|
74
|
+
| `config.logger.*` | `level`, `clientLevel`, `bufferLogLevel`, `historyLength`, `clientHistoryLength`, `separateLogBuffers`, `clientName`. Defaults for `level` and `historyLength` are in `src/config.js`. |
|
|
75
|
+
| Secrets | N/A — this package reads no credentials. It removes `authorization` keys from logged values. |
|
|
76
|
+
|
|
77
|
+
## First-run verification
|
|
78
|
+
|
|
79
|
+
1. `yarn install` from the workspace root.
|
|
80
|
+
2. `yarn workspace @webex/plugin-logger build`
|
|
81
|
+
3. `yarn workspace @webex/plugin-logger test:style`
|
|
82
|
+
4. `yarn workspace @webex/plugin-logger test:unit`
|
|
83
|
+
|
|
84
|
+
## Next steps
|
|
85
|
+
|
|
86
|
+
- [Architecture](architecture.md)
|
|
87
|
+
- [Module specification](../src/docs/README.md)
|
|
88
|
+
- [Specification registry](specs/README.md)
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
okf_version: "0.1"
|
|
3
|
+
---
|
|
4
|
+
<!-- sdd-generated-metadata
|
|
5
|
+
doc_kind: standing-doc
|
|
6
|
+
generated_from: docs-index@0.3.0
|
|
7
|
+
generated_by: claude-cowork
|
|
8
|
+
approved_by: akulakum@cisco.com
|
|
9
|
+
updated_at: 2026-10-08T08:51:39Z
|
|
10
|
+
validation_status: pass-with-warnings
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
# @webex/plugin-logger documentation
|
|
14
|
+
|
|
15
|
+
Doc map for developers and agents.
|
|
16
|
+
|
|
17
|
+
This package publishes the Webex SDK logger plugin. It prints leveled output to `console`, redacts authorization keys, email addresses, and MTID values, and keeps bounded in-memory buffers that `@webex/internal-plugin-support` formats and uploads.
|
|
18
|
+
|
|
19
|
+
## Start here
|
|
20
|
+
|
|
21
|
+
- [Getting started](getting-started.md)
|
|
22
|
+
- [Package architecture](architecture.md)
|
|
23
|
+
- [Module specification](../src/docs/README.md) — behavior of `src/`
|
|
24
|
+
|
|
25
|
+
## Decisions
|
|
26
|
+
|
|
27
|
+
- [adr/](adr/) — architectural decision records
|
|
28
|
+
|
|
29
|
+
## Specifications and contracts
|
|
30
|
+
|
|
31
|
+
- [architecture.md](architecture.md) — canonical package-wide architecture
|
|
32
|
+
- [specs/README.md](specs/README.md) — manifest-backed module and contract registry
|
|
33
|
+
- `src/docs/README.md` — the owning specification beside the module's code
|
|
34
|
+
- [adr/](adr/) — concrete architectural decisions
|
|
35
|
+
|
|
36
|
+
No deployable service exists in this package, so no service specification is generated. The published contract is an npm/SDK surface whose authoritative source is `package.json` together with `src/index.js`, not an OpenAPI document.
|
|
37
|
+
|
|
38
|
+
## Related repository resources
|
|
39
|
+
|
|
40
|
+
- `README.md` — the package's npm-facing usage document, retained separately from this generated documentation set. See [ADR 0001](adr/0001-retain-product-readme.md).
|
|
41
|
+
|
|
42
|
+
No `ci/`, `operate/`, `diagrams/`, or runbook directories exist in this package.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Reference
|
|
3
|
+
title: Specification registry
|
|
4
|
+
description: Canonical specification registry and change-routing guide.
|
|
5
|
+
tags: [specifications, registry]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: standing-doc
|
|
9
|
+
generated_from: spec-index@0.3.0
|
|
10
|
+
generated_by: claude-cowork
|
|
11
|
+
approved_by: akulakum@cisco.com
|
|
12
|
+
updated_at: 2026-10-08T08:51:39Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Specification registry
|
|
17
|
+
|
|
18
|
+
Use this page to find the canonical package architecture and the instantiated module specification. Keep technical facts in the owning document.
|
|
19
|
+
|
|
20
|
+
Start with the [package architecture](../architecture.md). No service specification exists here: this package is a library published to npm, not a deployable service, so that artifact is omitted in `.sdd/manifest.json`.
|
|
21
|
+
|
|
22
|
+
## Document roles
|
|
23
|
+
|
|
24
|
+
| Document | Canonical ownership |
|
|
25
|
+
| -------- | ------------------- |
|
|
26
|
+
| [Package architecture](../architecture.md) | Package boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
|
|
27
|
+
| Service specification | Not applicable — no deployable service exists in this package |
|
|
28
|
+
| Module specifications | Stable behavior and design at each manifest-routed module spec |
|
|
29
|
+
| [ADR](../adr/) | A durable decision, its rationale, and consequences |
|
|
30
|
+
|
|
31
|
+
## Instantiated specification registry
|
|
32
|
+
|
|
33
|
+
| Resource | Role | Canonical path | Owner | Status | Last verified |
|
|
34
|
+
| -------- | ---- | -------------- | ----- | ------ | ------------- |
|
|
35
|
+
| Package | Architecture | `docs/architecture.md` | @webex/web-client, @webex/web-sdk | Active | 2026-10-06 |
|
|
36
|
+
| Logger plugin | Module | `src/docs/README.md` | @webex/web-client, @webex/web-sdk | Draft | 2026-10-06 |
|
|
37
|
+
| `plugin-logger-sdk` | Contract | `package.json` | @webex/web-client, @webex/web-sdk | Active | 2026-10-06 |
|
|
38
|
+
| `log-buffer-format` | Contract | `src/logger.js` | @webex/web-client, @webex/web-sdk | Active | 2026-10-06 |
|
|
39
|
+
|
|
40
|
+
### Module registry
|
|
41
|
+
|
|
42
|
+
| Module | Responsibility | Manifest coverage state | Start here |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| `src` | Leveled console logging, redaction, bounded buffers, and upload formatting | Partial | `src/docs/README.md` |
|
|
45
|
+
|
|
46
|
+
Generator-side field measurement is complete. Field coverage measured 2026-10-06 is 93.8% (15 of 16 mandatory fields PRESENT). Critical fields are 8 of 8 PRESENT. The WEAK field is test strategy: registration, the non-throwing catch branch, group indentation, and the documented redaction gaps have no unit test. Coverage state stays `Partial` until independent validation runs and a spec-drift record exists.
|
|
47
|
+
|
|
48
|
+
## Change and verification routing
|
|
49
|
+
|
|
50
|
+
| Change affects | Load and update | Verification route |
|
|
51
|
+
| -------------- | --------------- | ------------------ |
|
|
52
|
+
| Package boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `yarn workspace @webex/plugin-logger test:unit` and `yarn workspace @webex/plugin-logger test:style` |
|
|
53
|
+
| A deployable service surface or operating posture | Not applicable — no deployable service exists in this package | Not applicable |
|
|
54
|
+
| A stable code or package boundary | `src/docs/README.md` | `yarn workspace @webex/plugin-logger test:unit` |
|
|
55
|
+
| Redaction, levels, buffers, or `formatLogs` output | The module spec plus `src/logger.js`; check `@webex/internal-plugin-support` | Unit spec, then `yarn workspace @webex/plugin-logger test:browser` |
|
|
56
|
+
|
|
57
|
+
## Module and contract registration
|
|
58
|
+
|
|
59
|
+
The only module is `src`, with canonical spec `src/docs/README.md`.
|
|
60
|
+
|
|
61
|
+
`plugin-logger-sdk` is published. Its ecosystem-native artifact is `package.json`. Per-export behavior is specified in the module spec and implemented in `src/`. No OpenAPI document applies, which is why `api-specs/openapi.yaml` is omitted.
|
|
62
|
+
|
|
63
|
+
`log-buffer-format` is internal. Its source is `src/logger.js`, and its consumer is `@webex/internal-plugin-support`.
|
|
64
|
+
|
|
65
|
+
`webex-core-plugin-host`, `webex-common-js-api`, and `lodash` are external required contracts. They are not implemented in this package.
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@webex/test-helper-chai": "3.12.0-next.9",
|
|
38
38
|
"@webex/test-helper-mocha": "3.12.0-next.9",
|
|
39
39
|
"@webex/test-helper-mock-webex": "3.12.0-next.9",
|
|
40
|
-
"@webex/webex-core": "3.12.0-next.
|
|
40
|
+
"@webex/webex-core": "3.12.0-next.61",
|
|
41
41
|
"lodash": "^4.17.21"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"test:style": "eslint ./src/**/*.*",
|
|
50
50
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
51
51
|
},
|
|
52
|
-
"version": "3.12.0-next.
|
|
52
|
+
"version": "3.12.0-next.58"
|
|
53
53
|
}
|