Skip to content

LogTape changelog ​

Version 1.0.0 ​

To be released.

  • Added getLogLevels() function to retrieve all available log levels.

  • Added LogMethod type for better type inference of logger methods.

  • Added nonBlocking option to getConsoleSink(), getStreamSink(), getFileSink(), and getRotatingFileSink() for high-performance logging scenarios. When enabled, log records are buffered and flushed in the background, preventing blocking of the main thread.

    • Console and stream sinks accept nonBlocking?: boolean | { bufferSize?: number; flushInterval?: number } option.
    • File sinks accept nonBlocking?: boolean option.
    • Default buffer size is 100 records for console/stream sinks and background flushing for file sinks.
    • Default flush interval is 100ms for console/stream sinks.
    • Console sink returns Sink & Disposable in non-blocking mode.
    • Stream and file sinks return Sink & AsyncDisposable in non-blocking mode.
    • Buffer-full flushes are now asynchronous (non-blocking) instead of synchronous to maintain performance during high-volume logging.
    • Console and stream sinks include automatic buffer overflow protection that prevents unbounded memory growth by dropping oldest records when buffer exceeds 2x the configured size.
    • Errors during background flushing are silently ignored to prevent application disruption.
  • Added getStreamFileSink() function in @logtape/file package for high-performance file logging using Node.js PassThrough streams.

    • Added StreamFileSinkOptions interface for configuring stream-based file sink behavior.
    • Uses PassThrough streams piped to WriteStreams for optimal I/O performance with automatic backpressure management and non-blocking writes.
    • Optimized for high-volume logging scenarios with superior throughput compared to standard file sinks.
    • Simple configuration with highWaterMark (default: 16384 bytes) and optional custom formatter options.
    • Automatic stream cleanup and proper resource disposal via Disposable interface.
    • Ideal for production applications requiring high-performance file logging without complex buffering configuration.
  • Added withBuffer() function to create buffered sinks that collect log records in memory and flush them to the underlying sink when the buffer is full or after a specified time interval.

    • Added BufferSinkOptions interface for configuring buffer behavior.
    • withBuffer() accepts bufferSize (default: 10 records) and flushInterval (default: 5000ms) options.
    • Buffered sinks automatically flush when buffer is full, time interval elapses, or the sink is disposed.
    • Returns a sink with AsyncDisposable support for proper cleanup.
  • Added fromAsyncSink() function to convert async sinks to regular sinks with proper async handling.

    • Added AsyncSink type: (record: LogRecord) => Promise<void>.
    • fromAsyncSink() chains async operations to ensure order preservation.
    • Errors in async sinks are caught to prevent breaking the promise chain.
    • Returns a sink with AsyncDisposable support that waits for all pending operations on disposal.
  • Added @logtape/cloudwatch-logs package for AWS CloudWatch Logs integration. [#48, #49]

    • Added getCloudWatchLogsSink() function to send logs to AWS CloudWatch Logs.
    • Added CloudWatchLogsSinkOptions interface for configuration.
    • Supports intelligent batching up to 10,000 events or 1MiB per batch.
    • Includes exponential backoff retry strategy for error handling.
    • Works with existing CloudWatch Logs clients or creates new ones automatically.
    • Supports custom AWS credentials and regions.
    • Added formatter option to support custom text formatters, including jsonLinesFormatter() for enhanced CloudWatch Logs Insights querying capabilities with dot notation support.
  • Added @logtape/windows-eventlog package for Windows Event Log integration. [#47, #50]

    • Added getWindowsEventLogSink() function to send logs to Windows Event Log.
    • Added WindowsEventLogSinkOptions interface for configuration.
    • Cross-runtime support: Works with Deno, Node.js, and Bun on Windows.
    • Uses runtime-optimized FFI implementations: Deno FFI, koffi for Node.js, and Bun FFI for maximum performance.
    • Supports all LogTape log levels with proper Event Log type mapping (Error, Warning, Information).
    • Includes structured logging support with formatted context information.
    • Added validateWindowsPlatform() function for platform validation.
    • Added WindowsPlatformError and WindowsEventLogError for proper error handling.
    • Platform-restricted installation (Windows only) for safety.
    • Includes PowerShell-based test verification for actual Event Log integration.
  • Added @logtape/pretty package for beautiful console formatting designed for local development. [#46, #51]

    • Added getPrettyFormatter() function to create visually appealing log formatters with colorful icons, smart category truncation, and perfect column alignment.
    • Added prettyFormatter constant for quick setup with sensible defaults.
    • Added PrettyFormatterOptions interface for extensive customization.
    • Features Signale-inspired design with emojis for each log level: πŸ” trace, πŸ› debug, ✨ info, ⚠️ warning, ❌ error, πŸ’€ fatal.
    • Includes smart category truncation that preserves important context while maintaining layout (e.g., appΒ·server…middleware).
    • Supports true color terminals with rich color schemes and dimmed text for enhanced readability.
    • Provides optional timestamp display, custom icons, color control, and flexible layout options.
    • Supports multiple text styles combination (e.g., ["bold", "underline"]) for level, category, message, and timestamp formatting.
    • Includes word wrapping feature with proper indentation alignment to maintain visual consistency for long messages.
    • Optimized for development environments with focus on visual clarity and developer experience.
  • Added @logtape/adaptor-pino package for integrating LogTape with Pino logging infrastructure. [#52]

    • Added getPinoSink() function to forward LogTape log records to Pino loggers.
    • Added PinoSinkOptions interface for configuring the adapter behavior.
    • Added CategoryOptions interface for customizing category formatting in Pino log messages.
    • Added install() function for convenient auto-configuration with custom Pino logger and configuration options.
    • Supports configurable category display with position (start/end), decorators ([], (), <>, {}, :, -, |, /, or none), and custom separators for multi-part categories.
    • Maps LogTape log levels to equivalent Pino levels.
    • Preserves LogTape's structured logging properties as Pino fields.
    • Enables seamless adoption of LogTape-enabled libraries in applications using Pino without requiring logging infrastructure changes.
  • Added @logtape/adaptor-winston package for integrating LogTape with winston logging infrastructure. [#52]

    • Added getWinstonSink() function to forward LogTape log records to winston loggers.
    • Added WinstonSinkOptions interface for configuring the adapter behavior.
    • Added CategoryOptions interface for customizing category formatting in winston log messages.
    • Added install() function for convenient auto-configuration with optional custom winston logger and configuration options.
    • Added install.ts module for automatic setup via simple import.
    • Supports configurable category display with position (start/end), decorators ([], (), <>, {}, :, -, |, /, or none), and custom separators for multi-part categories.
    • Maps LogTape log levels to equivalent winston levels with customizable level mapping.
    • Supports custom value formatters for interpolated values in log messages.
    • Preserves LogTape's structured logging properties as winston fields.
    • Enables seamless adoption of LogTape-enabled libraries in applications using winston without requiring logging infrastructure changes.
  • Fixed browser support for @logtape/otel package by removing direct node:process dependency. [#53]

    • Replaced node:process import with cross-runtime environment variable access that works in Deno, Node.js, and browsers.
    • Changed tsdown platform setting from "node" to "neutral" to enable browser compatibility.
    • The getOpenTelemetrySink() function now works in all JavaScript runtimes without throwing module resolution errors.
  • Removed the deprecated LoggerConfig.level property. Use LoggerConfig.lowestLevel instead for setting the minimum log level, or use LoggerConfig.filters for more advanced filtering.

Version 0.12.1 ​

Released on June 19, 2025.

  • Fixed module resolution issues in CommonJS environments and bundlers like Vite by properly configuring conditional exports for types.

    • Updated all package.json exports to use conditional types exports with separate .d.ts files for ESM imports and .d.cts files for CommonJS requires.
    • This resolves runtime errors in frameworks like SvelteKit that require proper CommonJS modules for modules imported in CommonJS contexts.

Version 0.12.0 ​

Released on June 15, 2025.

  • Added the "trace" severity level, which is lower than "debug". [#24]

  • Added Logger.warning() method which is an alias for Logger.warn(). [#44]

  • Added bufferSize and flushInterval options to FileSinkOptions for configurable buffering in file sinks.

    • getFileSink() and getRotatingFileSink() functions now accept a bufferSize option to control write buffering behavior.
    • getFileSink() and getRotatingFileSink() functions now accept a flushInterval option to control the time-based flushing of the buffer to disk.
    • When bufferSize is 0 or negative, writes are immediate without buffering.
    • When bufferSize is positive, log entries are buffered until the buffer size is exceeded, then flushed to disk.
    • Default buffer size is 8192 characters for improved performance.
    • Buffer content is automatically flushed when the sink is disposed.
    • When flushInterval is 0 or negative, the time-based flushing is disabled.
    • Default flushInterval is 5000 milliseconds (5 seconds) for periodic flushing.
  • Added @logtape/syslog package for sending log messages to syslog servers using RFC 5424 format.

    • Added getSyslogSink() function to create syslog sinks with support for both UDP and TCP protocols.
    • Supports all standard RFC 5424 facilities (kern, user, mail, daemon, local0–7, etc.) and automatic priority calculation.
    • Includes structured data support for log record properties with proper RFC 5424 escaping of special characters.
    • Cross-runtime compatibility with Deno, Node.js, and Bun.
    • Configurable connection timeouts, custom hostnames, and application names.
  • Now @logtape/otel, @logtape/sentry, and @logtape/syslog packages are released along with @logtape/logtape package. This means they share the same version number and changelog. This is to ensure that the packages are always compatible with each other and to simplify the release process.

  • Improved build and test infrastructure by migrating from dnt to tsdown for npm package bundling. [#43]

Version 0.11.0 ​

Released on June 2, 2025.

Version 0.10.0 ​

Released on May 19, 2025.

Version 0.9.2 ​

Released on May 15, 2025.

  • Fixed a bug where importing @logtape/logtape threw a ReferenceError on Node.js or Bun when LogTape was installed from JSR (instead of npm). [#42]

Version 0.9.1 ​

Released on April 24, 2025.

  • Fixed a CORS error when using LogTape in web browser environments like Fresh islands components due to importing Node.js node:util module. [#40]

Version 0.9.0 ​

Released on March 1, 2025.

Version 0.8.2 ​

Released on February 11, 2025.

  • Fixed a bug of text formatters where they truncated string and array values in the formatted message. [#30]

Version 0.8.1 ​

Released on February 1, 2025.

  • Fixed a bug where when a child logger is configured with a lower lowestLevel than its parent logger, a log record with a severity level lower than the parent logger's lowestLevel and higher than the child logger's lowestLevel would not be filtered out by the parent logger.

Version 0.8.0 ​

Released on November 20, 2024.

Version 0.7.2 ​

Released on February 11, 2025.

  • Fixed a bug of text formatters where they truncated string and array values in the formatted message. [#30]

Version 0.7.1 ​

Released on October 30, 2024.

  • The withContext() function no more throws an error even if no contextLocalStorage is configured. Instead, it will log a warning message to the ["logtape", "meta"] logger.

Version 0.7.0 ​

Released on October 29, 2024.

Version 0.6.5 ​

Released on February 11, 2025.

  • Fixed a bug of text formatters where they truncated string and array values in the formatted message. [#30]

Version 0.6.4 ​

Released on October 28, 2024.

  • Fixed a build warning due to importing node:fs and node:util modules on Next.js' client rendering. [#19]
  • Made it to work on Deno 2.0.0 or higher.

Version 0.6.3 ​

Released on October 3, 2024.

  • Fixed a build error due to importing node:fs and node:util modules on Next.js' client rendering.

Version 0.6.2 ​

Released on September 24, 2024.

  • Fixed a build warning due to importing node:util module on Next.js. [#11]

Version 0.6.1 ​

Released on September 24, 2024.

  • Fixed a build error due to importing node:util module on Vite. [#18]

Version 0.6.0 ​

Released on September 24, 2024.

Version 0.5.4 ​

Released on September 24, 2024.

  • Fixed a build warning due to importing node:util module on Next.js. [#11]

Version 0.5.3 ​

Released on September 24, 2024.

  • Fixed a build error due to importing node:util module on Vite. [#18]

Version 0.5.2 ​

Released on September 23, 2024.

  • Fixed a build error due to top-level await on Vite. [#14]

Version 0.5.1 ​

Released on September 10, 2024.

  • Fixed a bug of defaultTextFormatter() function where it rendered embedded values in the message as JSON instead of util.inspect() on Node.js and Bun.

  • Fixed a bug of ansiColorFormatter() function where it failed to colorize embedded values in the message on Node.js and Bun.

Version 0.5.0 ​

Released on August 29, 2024.

  • LogTape now provides contexts for loggers. [#7, #8]

  • The console sink now can take a TextFormatter besides a ConsoleFormatter for formatting log records.

  • Added ansiColorFormatter() function.

  • configure() function's filters option became optional.

    • The type of Config.filters became Record<string, FilterLike> | undefined (was Record<string, FilterLike>).

Version 0.4.3 ​

Released on August 22, 2024.

  • Fixed a bug where getRotatingFileSink() function had failed to create a new log file when there's no log file to rotate yet. [#9]

Version 0.4.2 ​

Released on July 15, 2024.

  • LogTape now works well on edge functions. [#5]

    • The npm version of LogTape no more depends on node:stream/web module.
    • LogTape now works well with JavaScript runtimes that do not support node:fs module.
    • LogTape now works well with JavaScript runtimes that do not support WeakRef class.
    • Got rid of eval() from LogTape.

Version 0.4.1 ​

Released on July 2, 2024.

  • Fixed a bug where LogTape failed to load under Node.js when incorporated in a project from JSR. [#3, #4 by Kitson Kelly]

Version 0.4.0 ​

Released on May 7, 2024.

  • Curly braces can now be escaped with double curly braces. [#1, #2 by Diyar Oktay]

Version 0.3.1 ​

Released on May 7, 2024.

  • Fixed a bug where two or more versions of LogTape were imported in the same runtime, the Logger instances would not be shared between them. This was caused by the Logger instances being stored in a module-level variable.

Version 0.3.0 ​

Released on April 22, 2024.

Version 0.2.3 ​

Released on May 7, 2024.

  • Fixed a bug where two or more versions of LogTape were imported in the same runtime, the Logger instances would not be shared between them. This was caused by the Logger instances being stored in a module-level variable.

Version 0.2.2 ​

Released on April 21, 2024.

  • Fixed a bug where the configured sinks and filters were reset after some inactivity. This was caused by garbage collection of the Logger instances. The Logger instances are now kept alive by an internal set of strong references until explicitly reset() is called.

Version 0.2.1 ​

Released on April 20, 2024.

Version 0.2.0 ​

Released on April 20, 2024.

  • Sinks now can be asynchronously disposed of. This is useful for sinks that need to flush their buffers before being closed.

    • Added dispose() function.
    • The return type of configure() function became Promise<void> (was void).
    • The return type of reset() function became Promise<void> (was void).
    • Configured sinks that implement AsyncDisposable are now disposed of asynchronously when the configuration is reset or the program exits.
  • The return type of getStreamSink() function became Sink & AsyncDisposable (was Sink & Disposable).

  • Added getRotatingFileSink() function.

Version 0.1.2 ​

Released on May 7, 2024.

  • Fixed a bug where two or more versions of LogTape were imported in the same runtime, the Logger instances would not be shared between them. This was caused by the Logger instances being stored in a module-level variable.

Version 0.1.1 ​

Released on April 21, 2024.

  • Fixed a bug where the configured sinks and filters were reset after some inactivity. This was caused by garbage collection of the Logger instances. The Logger instances are now kept alive by an internal set of strong references until explicitly reset() is called.

Version 0.1.0 ​

Initial release. Released on April 19, 2024.