Skip to content

Release 1.2.0: add logged-test module and JSON event emission - #2

Merged
Fayupable merged 1 commit into
mainfrom
dev/v1.2.0
Aug 5, 2026
Merged

Release 1.2.0: add logged-test module and JSON event emission#2
Fayupable merged 1 commit into
mainfrom
dev/v1.2.0

Conversation

@Fayupable

Copy link
Copy Markdown
Owner
  • Add logged-test module: in-memory, thread-safe test doubles for all three output ports (InMemoryInvocationEventEmitter, InMemoryMetricsRecorder with a new RecordedMetric record, InMemoryClientInfoPort), so a consuming project can assert directly on @Logged behavior in tests instead of parsing log output or hand-rolling its own stubs. Depends only on logged-core, works with or without logged-spring on the classpath.
  • Add JsonInvocationEventEmitter (logged-spring): writes each MethodInvocationEvent as a single line of structured JSON through SLF4J, for applications shipping logs to Loki/Elasticsearch/Datadog and similar backends that parse each line as JSON. Uses a small hand-written JSON writer with proper string escaping instead of adding a JSON library dependency.
  • Update README with "Testing with logged-test" and "JSON event emission" sections, and the Modules table.

Bumps version to 1.2.0.

- Add logged-test module: in-memory, thread-safe test doubles for all three
  output ports (InMemoryInvocationEventEmitter, InMemoryMetricsRecorder with
  a new RecordedMetric record, InMemoryClientInfoPort), so a consuming
  project can assert directly on @Logged behavior in tests instead of
  parsing log output or hand-rolling its own stubs. Depends only on
  logged-core, works with or without logged-spring on the classpath.
- Add JsonInvocationEventEmitter (logged-spring): writes each
  MethodInvocationEvent as a single line of structured JSON through SLF4J,
  for applications shipping logs to Loki/Elasticsearch/Datadog and similar
  backends that parse each line as JSON. Uses a small hand-written JSON
  writer with proper string escaping instead of adding a JSON library
  dependency.
- Update README with "Testing with logged-test" and "JSON event emission"
  sections, and the Modules table.

Bumps version to 1.2.0.
@Fayupable
Fayupable merged commit 25eb200 into main Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant