洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@hollo.social

Just released 0.9.0! 🎉

This version brings two major improvements to our zero-dependency library for :

  1. New Synchronous Configuration API: You can now configure LogTape synchronously with configureSync(), disposeSync(), and resetSync(). Perfect for simpler setups where you don't need async operations!

  2. Better Runtime Compatibility: We've moved all file-related components to a separate @logtape/file package. This means the core package now works flawlessly across all JavaScript environments—browsers, edge functions, and various bundlers without any file system dependencies.

Plus, we've added level mapping options for console sinks, giving you more control over how your logs appear.

Check out the full release notes for migration details:

https://hackers.pub/@hongminhee/2025/logtape-090

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@hackers.pub

We're excited to announce the release of LogTape 0.9.0! This version brings important improvements to make LogTape more flexible across different JavaScript environments while simplifying configuration for common use cases.

What's New

  • Synchronous Configuration API: Added new synchronous configuration functions for environments where async operations aren't needed or desired
  • Improved Runtime Compatibility: Moved file-system dependent components to a separate package for better cross-runtime support

New Features

Synchronous Configuration API: Simplifying Your Setup

Added synchronous versions of the configuration functions:

These functions offer a simpler API for scenarios where async operations aren't needed, allowing for more straightforward code without awaiting promises. Note that these functions cannot use sinks or filters that require asynchronous disposal (such as stream sinks), but they work perfectly for most common logging configurations.

import { configureSync, getConsoleSink } from "@logtape/logtape";

configureSync({ 
  sinks: {
    console: getConsoleSink(),
  },
  loggers: [
    {
      category: "my-app",
      lowestLevel: "info",
      sinks: ["console"],
    },
  ],
});

Console Sink Enhancements

Breaking Changes

File Sinks Moved to Separate Package: Better Cross-Platform Support

To improve runtime compatibility, file-related sinks have been moved to the @logtape/file package:

This architectural change ensures the core @logtape/logtape package is fully compatible with all JavaScript runtimes, including browsers and edge functions, without introducing file system dependencies. You'll now enjoy better compatibility with bundlers like Webpack, Rollup, and Vite that previously had issues with the file system imports.

Migration Guide

If you were using file sinks, update your imports:

// Before
import { getFileSink, getRotatingFileSink } from "@logtape/logtape";

// After
import { getFileSink, getRotatingFileSink } from "@logtape/file";

Don't forget to install the new package:

# For npm, pnpm, Yarn, Bun
npm add @logtape/file

# For Deno
deno add jsr:@logtape/file

Looking Forward

This release represents our ongoing commitment to making LogTape the most flexible and developer-friendly logging solution for JavaScript and TypeScript applications. We're continuing to improve performance and extend compatibility across the JavaScript ecosystem.

Contributors

Special thanks to Murph Murphy for their valuable contribution to this release.


As always, we welcome your feedback and contributions! Feel free to open issues or pull requests on our GitHub repository.

Happy logging!

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee)'s post

0.9.0をリリースしました!🎉

今回のバージョンでは、TypeScript向けの依存関係ゼロのロギングライブラリに二つの大きな改善を加えました:

  1. 新しい同期設定APIconfigureSync()disposeSync()resetSync()を使って同期的にLogTapeを設定できるようになりました。非同期操作が不要なシンプルな環境に最適です!

  2. ランタイム互換性の向上:ファイル関連のコンポーネントをすべて別パッケージ@logtape/fileに移動しました。これにより、コアパッケージはファイルシステム依存なしで、ブラウザ、エッジ関数、各種バンドラーなど、あらゆるJavaScript環境でシームレスに動作します。

さらに、コンソールシンクにレベルマッピングオプションを追加し、ログの表示方法をより細かく制御できるようになりました。

移行の詳細については、リリースノートをご覧ください。

https://zenn.dev/hongminhee/articles/98989e400c5fcf