To be released.
Released on November 20, 2024.
-
Renewed the API to configure the lowest severity level of loggers. [#26]
- Added
LoggerConfig.lowestLevel
property. - Deprecated
LoggerConfig.level
property in favor ofLoggerConfig.lowestLevel
.
- Added
-
Added
compareLogLevel()
function.
Released on October 30, 2024.
- The
withContext()
function no more throws an error even if nocontextLocalStorage
is configured. Instead, it will log a warning message to the["logtape", "meta"]
logger.
Released on October 29, 2024.
-
Introduced implicit contexts.
- Added
withContext()
function. - Added
Config.contextLocalStorage
option. - Added
ContextLocalStorage
interface.
- Added
Released on October 28, 2024.
- Fixed a build warning due to importing
node:fs
andnode:util
modules on Next.js' client rendering. [#19] - Made it to work on Deno 2.0.0 or higher.
Released on October 3, 2024.
- Fixed a build error due to importing
node:fs
andnode:util
modules on Next.js' client rendering.
Released on September 24, 2024.
Released on September 24, 2024.
Released on September 24, 2024.
-
Loggers now can override sinks of their ascendants. Still, they inherit the sinks of their ascendants by default. [#15]
- Added
LoggerConfig.parentSinks
property.
- Added
-
Placeholders in message templates now forgive leading and trailing spaces. However, if a property with exactly the same name exists, it will be prioritized over space-trimmed properties. [#16]
-
Added
LogRecord.rawMessage
property. [#17] -
Built-in text formatters now can be customized with a
TextFormatterOptions
object. [#13]- Added
TextFormatterOptions
interface. - Added
FormattedValues
interface. - Added
getTextFormatter()
function. - Added
AnsiColor
type. - Added
AnsiStyle
type. - Added
AnsiColorFormatterOptions
interface. - Added
getAnsiColorFormatter()
function.
- Added
Released on September 24, 2024.
Released on September 24, 2024.
Released on September 23, 2024.
Released on September 10, 2024.
-
Fixed a bug of
defaultTextFormatter()
function where it rendered embedded values in the message as JSON instead ofutil.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.
Released on August 29, 2024.
-
LogTape now provides contexts for loggers. [#7, #8]
- Added
Logger.with()
method.
- Added
-
The console sink now can take a
TextFormatter
besides aConsoleFormatter
for formatting log records.- The type of
ConsoleSinkOptions.formatter
becameConsoleFormatter | TextFormatter | undefined
(wasConsoleFormatter | undefined
).
- The type of
-
Added
ansiColorFormatter()
function. -
configure()
function'sfilters
option became optional.- The type of
Config.filters
becameRecord<string, FilterLike> | undefined
(wasRecord<string, FilterLike>
).
- The type of
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]
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.
- The npm version of LogTape no more depends on
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]
Released on May 7, 2024.
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 theLogger
instances being stored in a module-level variable.
Released on April 22, 2024.
- Added
parseLogLevel()
function. - Added
isLogLevel()
function. - Added
getConfig()
function. - Added
withFilter()
function.
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 theLogger
instances being stored in a module-level variable.
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. TheLogger
instances are now kept alive by an internal set of strong references until explicitlyreset()
is called.
Released on April 20, 2024.
- Removed
FileSinkDriver
interface. - Added
RotatingFileSinkOptions
interface.
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 becamePromise<void>
(wasvoid
). - The return type of
reset()
function becamePromise<void>
(wasvoid
). - Configured sinks that implement
AsyncDisposable
are now disposed of asynchronously when the configuration is reset or the program exits.
- Added
-
The return type of
getStreamSink()
function becameSink & AsyncDisposable
(wasSink & Disposable
). -
Added
getRotatingFileSink()
function.
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 theLogger
instances being stored in a module-level variable.
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. TheLogger
instances are now kept alive by an internal set of strong references until explicitlyreset()
is called.
Initial release. Released on April 19, 2024.