Skip to content

Update dependency @logtape/logtape to v2.4.0 - #2267

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/logtape-logtape-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/logtape-logtape-2.x

Conversation

@renovate

@renovate renovate Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@logtape/logtape (source) 2.3.11 → 2.4.0 age confidence

Release Notes

dahlia/logtape (@​logtape/logtape)

v2.4.0

Compare Source

Released on October 7, 2026.

@​logtape/logtape
  • Added "forward" mode to the parentSinks option of LoggerConfig.
    Unlike the default "inherit" mode, "forward" inherits ancestors'
    configured sinks without applying each ancestor's lowestLevel
    threshold, so records accepted by the logger's own lowestLevel reach
    the inherited sinks as well. An ancestor configured with
    parentSinks: "override" still stops the inheritance chain. [#​198]

  • Added FingersCrossedSink.flush() and FingersCrossedSink.discard()
    methods and the FingersCrossedOptions.bufferAction callback for flushing
    or discarding isolated buffers when a request or job completes. [#​205]

  • Added an optional synchronous snapshot(record) callback to
    FingersCrossedOptions to copy records when fingersCrossed() buffers
    them. [#​242, #​250]

  • Added getLoggers() function to enumerate every logger in the category
    tree rooted at a given logger (or the root logger by default), including
    the given logger itself, in depth-first pre-order.
    [#​62, #​207 by Jepoy]

  • Added inspectLogger() function, which explains how the current
    configuration routes records for a logger without logging anything or
    invoking filters and sinks. It reports the effective category, the
    level gates and sink paths (repeats included) with the categories that
    supplied them, the selected filters, where sink inheritance stops, and
    whether a scoped configuration applies. [#​243, #​251]

    • Added InspectLoggerOptions, LoggerInspection,
      LoggerNodeInspection, SinkPathInspection,
      LevelGateInspection, FilterSetInspection, FilterInspection,
      and InheritanceBoundaryInspection interfaces.
    • Added LoggerInspectionStatus type.
  • Added opt-in source location capture for development logging. Setting
    the new captureSourceLocation option of a logger configuration to
    true records where each logging method was called, when the runtime's
    stack trace makes it available, in the new optional
    LogRecord.sourceLocation field, typed as the new SourceLocation
    interface. Child categories inherit the setting, withConfig() and
    withConfigSync() accept it too, and it is off by default. LogTape
    does not resolve source maps, so bundled or minified code may report
    positions in the generated code. [#​134, #​241, #​253]

  • Added the TextFormatterOptions.sourceLocation option so that
    getTextFormatter() and getAnsiColorFormatter() can show captured
    source locations, and the optional FormattedValues.sourceLocation
    field for custom format callbacks. [#​134, #​241, #​253]

  • Added the getConsoleFormatter() function and the
    ConsoleFormatterOptions interface. Its sourceLocation option shows
    captured source locations in console output; without options it
    formats records like defaultConsoleFormatter(). [#​134, #​241, #​253]

  • Added optional onDrop and onError callbacks to non-blocking console
    and stream sinks to report aggregated buffer overflow counts and output
    failures without exposing dropped records. Added the SinkDropReason,
    SinkDropEvent, and SinkErrorEvent types for these notifications.
    [#​245, #​249]

  • Fixed concurrent or repeated disposal of a non-blocking stream sink so
    pending output finishes before its writer is closed or released.
    [#​245, #​249]

  • Added queue limits and a request lifetime hook to fromAsyncSink().
    Its type is now
    (asyncSink: AsyncSink, options?: AsyncSinkOptions) => Sink & AsyncDisposable
    (was (asyncSink: AsyncSink) => Sink & AsyncDisposable). Without options,
    the adapter behaves as before. [#​238, #​246]

    • The maxQueueSize and overflow options cap how many records wait
      for the async sink, not counting the one being processed, and choose
      whether a full queue drops its oldest waiting record (the default)
      or the incoming one. The limit bounds queued records, not total
      memory: with "drop-oldest", the promise and request-context
      bookkeeping of each dropped record remains until the record being
      processed at that time settles. "drop-newest" leaves nothing
      behind for rejected records.
    • The onDrop callback receives a SinkDropEvent with the number of
      dropped records and the reason, but no record payloads.
    • The waitUntil callback is called synchronously while a record is
      being logged, with a Promise that settles once that record and
      every earlier record have been processed or dropped. Passing
      a platform's waitUntil() function lets serverless functions finish
      sending logs after returning a response.
    • Added the AsyncSinkOptions interface and the
      AsyncSinkOverflowPolicy, SinkDropEvent, and SinkDropReason
      types.
  • Added the "bare" preset to the TextFormatterOptions.value option, so
    that getTextFormatter() and getAnsiColorFormatter() can render
    interpolated string values without the quotes and escapes that
    inspect() adds. Other values, including strings nested in objects and
    arrays, are rendered as before. Bare strings are sanitized instead: SGR
    sequences are always escaped, and newlines are escaped unless
    TextFormatterOptions.sanitize explicitly preserves them. [#​236, #​237]

  • Changed the type of the TextFormatterOptions.value option to
    "bare" | ((value: unknown, inspect: (value: unknown, options?: { colors?: boolean }) => string) => string)
    (was
    (value: unknown, inspect: (value: unknown, options?: { colors?: boolean }) => string) => string).
    Code that calls the option directly now has to check that it is a function
    first. [#​236, #​237]

  • Added the FingersCrossedOptions.afterTrigger option and the
    FingersCrossedAfterTrigger type. Setting it to "buffer" makes
    fingersCrossed() go back to buffering after each trigger instead of
    passing every subsequent record through, so long-running processes can
    output each error together with the records that led up to it.
    [#​234, #​235]

  • Added the StreamSinkOptions.closeStream option to dispose stream sinks
    without closing caller-owned streams. [#​203]

  • Added the drain() function and the Drainable interface for waiting
    until the records that sinks accepted before the call have settled,
    without disposing of the sinks. A record settles when its sink operation
    finishes, including when the operation fails, or when the sink drops the
    record after accepting it. Records logged after the call are not waited
    for. The sinks returned by getStreamSink() and fromAsyncSink() have
    a drain() method, and withFilter() and fingersCrossed() forward it
    when the wrapped sink has one. Draining a fingersCrossed() sink does
    not release records still waiting for a trigger. [#​239, #​247]

  • Changed the type of the getStreamSink() function to
    (stream: WritableStream, options?: StreamSinkOptions) => Sink & AsyncDisposable & Drainable
    (was
    (stream: WritableStream, options?: StreamSinkOptions) => Sink & AsyncDisposable).
    [#​239, #​247]

  • Changed the type of the fromAsyncSink() function to
    (asyncSink: AsyncSink, options?: AsyncSinkOptions) => Sink & AsyncDisposable & Drainable
    (was
    (asyncSink: AsyncSink, options?: AsyncSinkOptions) => Sink & AsyncDisposable).
    [#​239, #​247]

  • Added overloads to the withFilter() and fingersCrossed() functions
    that keep Drainable in the return type when the wrapped sink is
    Drainable, such as
    withFilter(sink: Sink & Drainable, filter: FilterLike): Sink & Drainable.
    [#​239, #​247]

@​logtape/config
@​logtape/elysia
  • Added support for Elysia 2 beta while retaining support for Elysia 1.4.
    [#​212]
  • Added the completionLevel option to ElysiaLogTapeOptions, which
    chooses the log level of a completed request's log record from the
    response outcome, for example "error" for server errors and
    "warning" for slow responses. Added the CompletionLevelFunction
    type, (ctx, completion) => LogLevel, and the RequestCompletion
    interface, which has the status, responseTime, and, for the record
    written by the plugin's error hook, the error. The callback also
    chooses that error record's level, which otherwise stays "error",
    without adding another record. The level option still applies to
    logRequest logs. When the callback throws or returns an invalid level,
    the record uses level, or "error" for the error record; such failures
    are reported to the meta logger and never change the response.
    [#​240, #​248]
@​logtape/express
  • Added the completionLevel option to ExpressLogTapeOptions, which
    chooses the log level of a completed request's log record from the
    response outcome, for example "error" for server errors and
    "warning" for slow responses. Added the CompletionLevelFunction
    type, (req, res, completion) => LogLevel, and the RequestCompletion
    interface, which has the final status and responseTime. The level
    option still applies to immediate logs, and is used when the callback
    throws or returns an invalid level; such failures are reported to
    the meta logger and never change the response. [#​240, #​248]
@​logtape/file
  • Added the rotatedFilePath option to getRotatingFileSink() to customize
    rotated log file paths, for example to keep the .log extension.
    [#​215, #​216]
  • Changed getRotatingFileSink() to reject positive maxFiles values unless
    they are integers from 1 to 1,000, throwing RangeError during sink
    creation. Update configurations outside this range before upgrading. Zero
    and negative values still disable backups. [#​216]
@​logtape/hono
  • Added the completionLevel option to HonoLogTapeOptions, which
    chooses the log level of a completed request's log record from the
    response outcome, for example "error" for server errors and
    "warning" for slow responses. Added the CompletionLevelFunction
    type, (c, completion) => LogLevel, and the RequestCompletion
    interface, which has the status, responseTime, the error from
    Hono's error handler or a failed response body stream, and whether
    the response body was aborted. The level option still applies to
    logRequest logs, and is used when the callback throws or returns
    an invalid level; such failures are reported to the meta logger and never
    change the response. [#​240, #​248]
@​logtape/koa
  • Added the completionLevel option to KoaLogTapeOptions, which chooses
    the log level of a completed request's log record from the response
    outcome, for example "error" for server errors and "warning" for slow
    responses. Added the CompletionLevelFunction type,
    (ctx, completion) => LogLevel, and the RequestCompletion interface,
    which has the status and responseTime. The level option still
    applies to logRequest logs, and is used when the callback throws or
    returns an invalid level; such failures are reported to the meta logger
    and never change the response. [#​240, #​248]
@​logtape/lint
  • Added an opt-in no-dynamic-message rule to @​logtape/lint for finding
    dynamic expressions passed as log messages. The rule uses available
    TypeScript type information to distinguish properties, callbacks, and
    Error overloads, with local inference as a fallback. Deno Lint users can
    enable it through the @logtape/lint/deno/strict entry point. [#​199]
  • Added an opt-in no-unrendered-properties lint rule to
    @​logtape/lint for finding properties that are not referenced by a
    message template and may be omitted by sinks that output only the
    message. The rule is excluded from the recommended preset and the
    default Deno Lint plugin, and is included in
    @logtape/lint/deno/strict. [#​214]
@​logtape/pretty
  • Added the PrettyFormatterOptions.value option, which takes the same
    values as TextFormatterOptions.value. Setting it to "bare" renders
    interpolated string values without the quotes and escapes that
    inspect() adds, sanitizing them instead; a function customizes how
    values are rendered, and receives an inspect() function that applies
    the inspectOptions and colors options. [#​236, #​237]
@​logtape/testing
  • Added LogRecorder.waitFor() and LogRecorderWaitOptions to wait for
    the first matching record with a timeout and optional cancellation through
    an AbortSignal. [#​244, #​252]

v2.3.12

Compare Source

Released on October 10, 2026.

@​logtape/logtape
  • Fixed configureSync() rejecting synchronous disposable sinks and filters
    in browsers without Symbol.dispose or Symbol.asyncDispose, including
    Safari. Sinks and filters now retain their distinct cleanup hooks,
    preventing duplicate cleanup and asynchronous cleanup during resetSync().
    Sink wrappers preserve these hooks, and disposable sinks also work with
    using and await using transpiled with registry-symbol fallbacks
    (Symbol.for("Symbol.dispose") and Symbol.for("Symbol.asyncDispose")).
    Scoped configurations now also preserve cleanup hooks and correctly
    distinguish synchronous and asynchronous resources in withConfig()
    and withConfigSync(). [[#​255], [#​257]]
@​logtape/cloudwatch-logs
  • Fixed CloudWatch Logs sinks losing their asynchronous cleanup hooks when
    Symbol.asyncDispose is unavailable. reset() now waits for buffered
    records to be flushed, and configureSync() correctly rejects these
    asynchronous sinks.
    [[#​255], [#​257]]
@​logtape/file
  • Fixed file sinks losing their cleanup hooks when Symbol.dispose or
    Symbol.asyncDispose is unavailable. Synchronous file sinks now work with
    configureSync(), and reset() invokes and awaits asynchronous cleanup,
    flushing buffered records for non-blocking and stream file sinks.
    [[#​255], [#​257]]
@​logtape/otel
  • Fixed OpenTelemetry sinks losing their asynchronous cleanup hooks in
    browsers without Symbol.asyncDispose, including Safari. reset() now
    waits for provider shutdown, and configureSync() correctly rejects these
    asynchronous sinks.
    [[#​255], [#​257]]
@​logtape/redaction
  • Fixed redactByField() dropping sink cleanup hooks in browsers without
    Symbol.dispose or Symbol.asyncDispose, including Safari, preventing
    reset() from flushing or closing wrapped sinks. Wrapped sinks now
    preserve distinct synchronous and asynchronous cleanup hooks.
    [[#​255], [#​257]]
  • Fixed redactByFieldAsync() losing its asynchronous cleanup hook when
    disposal symbols are unavailable. reset() now waits for pending
    redaction and wrapped sink cleanup, and configureSync() rejects these
    asynchronous wrappers.
    [[#​255], [#​257]]
@​logtape/syslog
  • Fixed Syslog sinks losing their asynchronous cleanup hooks when
    Symbol.asyncDispose is unavailable. reset() now waits for pending
    messages before closing the connection, and configureSync() correctly
    rejects these asynchronous sinks.
    [[#​255], [#​257]]
@​logtape/windows-eventlog
  • Fixed Windows Event Log sinks losing their synchronous cleanup hooks when
    Symbol.dispose is unavailable. configureSync() now accepts these
    sinks, and reset() and resetSync() release their Event Log resources.
    [[#​255], [#​257]]

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • Between 07:00 AM and 04:59 PM, only on Monday, Tuesday, Wednesday, and Thursday (* 7-16 * * 1,2,3,4)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ea470370-6531-4002-a410-77379da5cbe3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@renovate
renovate Bot deployed to staging October 9, 2026 20:23 Active

This branch was successfully deployed

1 active deployment
staging — 757bb82b Deployed Oct 9, 2026 by renovate[bot] via deploy-pr / Deploy PR #10113
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.

0 participants