Repository navigation
Update dependency @logtape/logtape to v2.4.0 - #2267
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.11→2.4.0Release Notes
dahlia/logtape (@logtape/logtape)
v2.4.0Compare Source
Released on October 7, 2026.
@logtape/logtape
Added
"forward"mode to theparentSinksoption ofLoggerConfig.Unlike the default
"inherit"mode,"forward"inherits ancestors'configured sinks without applying each ancestor's
lowestLevelthreshold, so records accepted by the logger's own
lowestLevelreachthe inherited sinks as well. An ancestor configured with
parentSinks: "override"still stops the inheritance chain. [#198]Added
FingersCrossedSink.flush()andFingersCrossedSink.discard()methods and the
FingersCrossedOptions.bufferActioncallback for flushingor discarding isolated buffers when a request or job completes. [#205]
Added an optional synchronous
snapshot(record)callback toFingersCrossedOptionsto copy records whenfingersCrossed()buffersthem. [#242, #250]
Added
getLoggers()function to enumerate every logger in the categorytree 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 currentconfiguration 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]
InspectLoggerOptions,LoggerInspection,LoggerNodeInspection,SinkPathInspection,LevelGateInspection,FilterSetInspection,FilterInspection,and
InheritanceBoundaryInspectioninterfaces.LoggerInspectionStatustype.Added opt-in source location capture for development logging. Setting
the new
captureSourceLocationoption of a logger configuration totruerecords where each logging method was called, when the runtime'sstack trace makes it available, in the new optional
LogRecord.sourceLocationfield, typed as the newSourceLocationinterface. Child categories inherit the setting,
withConfig()andwithConfigSync()accept it too, and it is off by default. LogTapedoes not resolve source maps, so bundled or minified code may report
positions in the generated code. [#134, #241, #253]
Added the
TextFormatterOptions.sourceLocationoption so thatgetTextFormatter()andgetAnsiColorFormatter()can show capturedsource locations, and the optional
FormattedValues.sourceLocationfield for custom
formatcallbacks. [#134, #241, #253]Added the
getConsoleFormatter()function and theConsoleFormatterOptionsinterface. ItssourceLocationoption showscaptured source locations in console output; without options it
formats records like
defaultConsoleFormatter(). [#134, #241, #253]Added optional
onDropandonErrorcallbacks to non-blocking consoleand stream sinks to report aggregated buffer overflow counts and output
failures without exposing dropped records. Added the
SinkDropReason,SinkDropEvent, andSinkErrorEventtypes 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]
maxQueueSizeandoverflowoptions cap how many records waitfor 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-contextbookkeeping of each dropped record remains until the record being
processed at that time settles.
"drop-newest"leaves nothingbehind for rejected records.
onDropcallback receives aSinkDropEventwith the number ofdropped records and the reason, but no record payloads.
waitUntilcallback is called synchronously while a record isbeing logged, with a
Promisethat settles once that record andevery earlier record have been processed or dropped. Passing
a platform's
waitUntil()function lets serverless functions finishsending logs after returning a response.
AsyncSinkOptionsinterface and theAsyncSinkOverflowPolicy,SinkDropEvent, andSinkDropReasontypes.
Added the
"bare"preset to theTextFormatterOptions.valueoption, sothat
getTextFormatter()andgetAnsiColorFormatter()can renderinterpolated string values without the quotes and escapes that
inspect()adds. Other values, including strings nested in objects andarrays, are rendered as before. Bare strings are sanitized instead: SGR
sequences are always escaped, and newlines are escaped unless
TextFormatterOptions.sanitizeexplicitly preserves them. [#236, #237]Changed the type of the
TextFormatterOptions.valueoption 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.afterTriggeroption and theFingersCrossedAfterTriggertype. Setting it to"buffer"makesfingersCrossed()go back to buffering after each trigger instead ofpassing 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.closeStreamoption to dispose stream sinkswithout closing caller-owned streams. [#203]
Added the
drain()function and theDrainableinterface for waitinguntil 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()andfromAsyncSink()havea
drain()method, andwithFilter()andfingersCrossed()forward itwhen the wrapped sink has one. Draining a
fingersCrossed()sink doesnot 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()andfingersCrossed()functionsthat keep
Drainablein the return type when the wrapped sink isDrainable, such aswithFilter(sink: Sink & Drainable, filter: FilterLike): Sink & Drainable.[#239, #247]
@logtape/config
captureSourceLocationoption of loggerconfigurations, matching @logtape/logtape 2.4.0. [#134, #241, #253]
parentSinksoption of logger configurations now accepts"forward", matching @logtape/logtape 2.4.0. [#198]@logtape/elysia
[#212]
completionLeveloption toElysiaLogTapeOptions, whichchooses 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 theCompletionLevelFunctiontype,
(ctx, completion) => LogLevel, and theRequestCompletioninterface, which has the
status,responseTime, and, for the recordwritten by the plugin's error hook, the
error. The callback alsochooses that error record's level, which otherwise stays
"error",without adding another record. The
leveloption still applies tologRequestlogs. When the callback throws or returns an invalid level,the record uses
level, or"error"for the error record; such failuresare reported to the meta logger and never change the response.
[#240, #248]
@logtape/express
completionLeveloption toExpressLogTapeOptions, whichchooses 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 theCompletionLevelFunctiontype,
(req, res, completion) => LogLevel, and theRequestCompletioninterface, which has the final
statusandresponseTime. Theleveloption still applies to
immediatelogs, and is used when the callbackthrows or returns an invalid level; such failures are reported to
the meta logger and never change the response. [#240, #248]
@logtape/file
rotatedFilePathoption togetRotatingFileSink()to customizerotated log file paths, for example to keep the .log extension.
[#215, #216]
getRotatingFileSink()to reject positivemaxFilesvalues unlessthey are integers from 1 to 1,000, throwing
RangeErrorduring sinkcreation. Update configurations outside this range before upgrading. Zero
and negative values still disable backups. [#216]
@logtape/hono
completionLeveloption toHonoLogTapeOptions, whichchooses 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 theCompletionLevelFunctiontype,
(c, completion) => LogLevel, and theRequestCompletioninterface, which has the
status,responseTime, theerrorfromHono's error handler or a failed response body stream, and whether
the response body was
aborted. Theleveloption still applies tologRequestlogs, and is used when the callback throws or returnsan invalid level; such failures are reported to the meta logger and never
change the response. [#240, #248]
@logtape/koa
completionLeveloption toKoaLogTapeOptions, which choosesthe log level of a completed request's log record from the response
outcome, for example
"error"for server errors and"warning"for slowresponses. Added the
CompletionLevelFunctiontype,(ctx, completion) => LogLevel, and theRequestCompletioninterface,which has the
statusandresponseTime. Theleveloption stillapplies to
logRequestlogs, and is used when the callback throws orreturns an invalid level; such failures are reported to the meta logger
and never change the response. [#240, #248]
@logtape/lint
no-dynamic-messagerule to @logtape/lint for findingdynamic expressions passed as log messages. The rule uses available
TypeScript type information to distinguish properties, callbacks, and
Erroroverloads, with local inference as a fallback. Deno Lint users canenable it through the
@logtape/lint/deno/strictentry point. [#199]no-unrendered-propertieslint 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
recommendedpreset and thedefault Deno Lint plugin, and is included in
@logtape/lint/deno/strict. [#214]@logtape/pretty
PrettyFormatterOptions.valueoption, which takes the samevalues as
TextFormatterOptions.value. Setting it to"bare"rendersinterpolated string values without the quotes and escapes that
inspect()adds, sanitizing them instead; a function customizes howvalues are rendered, and receives an
inspect()function that appliesthe
inspectOptionsandcolorsoptions. [#236, #237]@logtape/testing
LogRecorder.waitFor()andLogRecorderWaitOptionsto wait forthe first matching record with a timeout and optional cancellation through
an
AbortSignal. [#244, #252]v2.3.12Compare Source
Released on October 10, 2026.
@logtape/logtape
configureSync()rejecting synchronous disposable sinks and filtersin browsers without
Symbol.disposeorSymbol.asyncDispose, includingSafari. 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
usingandawait usingtranspiled with registry-symbol fallbacks(
Symbol.for("Symbol.dispose")andSymbol.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
Symbol.asyncDisposeis unavailable.reset()now waits for bufferedrecords to be flushed, and
configureSync()correctly rejects theseasynchronous sinks.
[[#255], [#257]]
@logtape/file
Symbol.disposeorSymbol.asyncDisposeis unavailable. Synchronous file sinks now work withconfigureSync(), andreset()invokes and awaits asynchronous cleanup,flushing buffered records for non-blocking and stream file sinks.
[[#255], [#257]]
@logtape/otel
browsers without
Symbol.asyncDispose, including Safari.reset()nowwaits for provider shutdown, and
configureSync()correctly rejects theseasynchronous sinks.
[[#255], [#257]]
@logtape/redaction
redactByField()dropping sink cleanup hooks in browsers withoutSymbol.disposeorSymbol.asyncDispose, including Safari, preventingreset()from flushing or closing wrapped sinks. Wrapped sinks nowpreserve distinct synchronous and asynchronous cleanup hooks.
[[#255], [#257]]
redactByFieldAsync()losing its asynchronous cleanup hook whendisposal symbols are unavailable.
reset()now waits for pendingredaction and wrapped sink cleanup, and
configureSync()rejects theseasynchronous wrappers.
[[#255], [#257]]
@logtape/syslog
Symbol.asyncDisposeis unavailable.reset()now waits for pendingmessages before closing the connection, and
configureSync()correctlyrejects these asynchronous sinks.
[[#255], [#257]]
@logtape/windows-eventlog
Symbol.disposeis unavailable.configureSync()now accepts thesesinks, and
reset()andresetSync()release their Event Log resources.[[#255], [#257]]
Configuration
📅 Schedule: (UTC)
* 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.
This PR was generated by Mend Renovate. View the repository job log.