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

@hongminhee@hollo.social

LogTape 2.0.0 released!

LogTape is a zero-dependency logging library for JavaScript/TypeScript that works across Deno, Node.js, Bun, and browsers.

What's new in 2.0.0:

  • lazy() for dynamic context: with() now supports values that are evaluated at logging time, not when the logger is created. Child loggers inherit the lazy wrapper, so they always see the current value.
  • Configuration from files: New @logtape/config package lets you load logging configuration from JSON, YAML, or TOML instead of writing TypeScript code.
  • Better error logging: Pass Error objects directly to logger.error(err) instead of wrapping them in properties.
  • Async lazy evaluation: Logging methods now accept async callbacks for expensive async operations.
  • isEnabledFor() method: Check if a log level is enabled before running expensive computations.
  • Time-based log rotation: Rotate logs daily, hourly, or weekly with automatic cleanup of old files.
  • New integrations: Elysia framework support and log4js adaptor.

https://github.com/dahlia/logtape/discussions/133