
洪 民憙 (Hong Minhee)
@hongminhee@hollo.social
Just released #LogTape 0.9.0! 🎉
This version brings two major improvements to our zero-dependency #logging library for #TypeScript:
-
New Synchronous Configuration API: You can now configure LogTape synchronously with
configureSync()
,disposeSync()
, andresetSync()
. Perfect for simpler setups where you don't needasync
operations! -
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:

洪 民憙 (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:
configureSync()
: Configure LogTape synchronouslydisposeSync()
: Dispose LogTape resources synchronouslyresetSync()
: Reset LogTape configuration synchronously
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
- Added
ConsoleSinkOptions.levelMap
option for customizing how log levels are mapped to console methods
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:
- Moved
getFileSink()
function to@logtape/file
package - Moved
FileSinkOptions
interface to@logtape/file
package - Moved
getRotatingFileSink()
function to@logtape/file
package - Moved
RotatingFileSinkOptions
interface to@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!