Skip to content

Remove the Scribe.noop logger#6

Merged
henrylee97 merged 1 commit into
mainfrom
remove-noop-logger
Jun 2, 2026
Merged

Remove the Scribe.noop logger#6
henrylee97 merged 1 commit into
mainfrom
remove-noop-logger

Conversation

@henrylee97

Copy link
Copy Markdown
Member

Summary

Removes the prebuilt Scribe.noop logger from the core library so Scribe ships only the essential building blocks of value-based structured logging (levels, fields, events, sinks, loggers).

A noop logger is a convenience value users can assemble in a line when they actually need one, so it doesn't need to live in the core API:

Scribe.create ~level:Scribe.Level.Debug ~sink:(Scribe.Sink.make (fun _ -> ()))
(* or, using the concrete sink package *)
Scribe.create ~level:Scribe.Level.Debug ~sink:(Scribe_sinks.Noop.create ())

Changes

  • lib/scribe.ml — delete the let noop = … definition.
  • lib/scribe.mli — remove val noop : t and its doc comment; reword the module-level doc comment that referenced [noop] so it no longer dangles.
  • test/test_scribe.ml — delete test_noop and its "noop logger" registration.

The Scribe_sinks.Noop sink is intentionally left unchanged — it's a concrete sink in the separate scribe.sinks package (not a logger), and it's exactly the primitive used to rebuild a noop logger. Its "noop sink" test stays.

Verification

  • dune build @fmt — formatting passes
  • dune build — compiles, no remaining Scribe.noop references
  • dune runtest — 4/4 tests pass (including noop sink)
  • dune build @install — passes

Keep the core Scribe library focused on the essential building blocks
of value-based structured logging. The noop logger was a convenience
value that users can assemble in a line when needed, e.g.

    Scribe.create ~level:Scribe.Level.Debug
      ~sink:(Scribe.Sink.make (fun _ -> ()))

Drop the value and its test, and reword the module doc comment that
referenced it. The Scribe_sinks.Noop sink is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@henrylee97 henrylee97 self-assigned this Jun 2, 2026
@henrylee97 henrylee97 added the refactor For tasks related to publishing a new version. label Jun 2, 2026
@henrylee97 henrylee97 enabled auto-merge (squash) June 2, 2026 08:44
@henrylee97 henrylee97 merged commit 6aa1cac into main Jun 2, 2026
2 checks passed
@henrylee97 henrylee97 deleted the remove-noop-logger branch June 2, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor For tasks related to publishing a new version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant