Commit 5f8d9a4
authored
feat: ship stoopid-logging v0.1 across Python, TypeScript, and Rust (#12)
* feat: ship stoopid-logging v0.1 across Python, TypeScript, and Rust
Implements the foundation phase's first deliverable: the three `stoopid-logging` packages (`-py`, `-ts`, `-rs`) plus the shared JSON schema they all emit against, plus the ADR resolving [ADR-0004](docs/adrs/0004-shared-logging-json-schema.md)'s two open design questions.
All three packages emit JSON conforming to a single contract. The schema is closed at the top level (`additionalProperties: false`); user-supplied bindings nest under `context`; OpenTelemetry `trace_id`/`span_id` auto-populate at the top level when an OTel SDK is loaded and a span is active.
* style: apply prettier defaults across repo
* ci: remove docker checks until base packages need them
The docker job, docker.yml workflow, and hadolint pre-commit hook all
gated on Dockerfile changes but also triggered on workflow edits, so
they ran on every PR with no Dockerfile to lint. Drop them; re-add via
PR when a Dockerfile lands.
* ci(typescript): build packages before tsc --noEmit
The root tsconfig includes examples/ts-*/**/*.ts which import
stoopid-logging by name. pnpm symlinks the workspace package, but its
types field points to ./dist/index.d.ts, so tsc fails to resolve types
until the package is built.
* ci: bump commitlint body/footer line length to 200
* ci(coverage): point diff-cover at jest's per-package cobertura output
jest writes coverage to <pkg>/coverage/cobertura-coverage.xml because it
runs in each workspace package's cwd, but the workflow looked for it at
the repo root. diff-cover failed to find it, no markdown report was
written, and the sticky-comment step then failed with the misleading
"Either message or path input is required". Discover all per-package
cobertura files via find so this scales as more TS packages land.
* test(stoopid-logging-rs): bring changed-line coverage from 46% → 92%
Adds inline unit tests for the env-var helpers (resolve_level,
resolve_service_name, resolve_service_version), the layer's
level_to_str/normalize_ts/JsonVisitor primitives, and a new
tests/builder_init.rs integration suite for the Builder/init/try_init
public surface. Adds serial_test as a dev-dep so the env-reading
helpers can be tested without races against the existing
emit_and_validate suite.
* style(stoopid-logging-rs): apply rustfmt to new test code
* fix(stoopid-logging-rs): resolve clippy lints on new tests
- doc_markdown: backtick identifiers (try_init, AlreadyInitialized,
LOG_LEVEL) in tests/builder_init.rs doc comments
- match_wildcard_for_single_variants: bind the unmatched arm to
AlreadyInitialized explicitly in resolve_level_unknown_returns_error
- float_equality_without_abs: wrap the subtraction (not the operand)
in .abs() for the f64 assertions in JsonVisitor tests1 parent 784bc68 commit 5f8d9a4
79 files changed
Lines changed: 10013 additions & 310 deletions
File tree
- .github/workflows
- .vscode
- docs/adrs
- examples
- python-logging-quickstart
- src/python_logging_quickstart
- rust-logging-quickstart
- ts-logging-quickstart
- packages
- python/stoopid-logging
- src/stoopid_logging
- tests
- rust/stoopid-logging
- src
- tests
- ts/stoopid-logging
- src
- tests
- schemas
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 67 | | |
75 | 68 | | |
76 | 69 | | |
| |||
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
| |||
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 232 | | |
255 | 233 | | |
256 | 234 | | |
257 | 235 | | |
258 | 236 | | |
259 | 237 | | |
260 | | - | |
| 238 | + | |
261 | 239 | | |
262 | 240 | | |
263 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
252 | 261 | | |
253 | 262 | | |
254 | 263 | | |
255 | | - | |
| 264 | + | |
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments