Skip to content
Discussion options

You must be logged in to vote

Yup, that makes sense. Thank you for your response and for this great library!

The reason I'm using nonBlocking: true is because read & writes happen through multiple threads.
Here is the workaround that I'm using, in case someone else in interested:

// logger-memory.ts
import { configureSync, LogRecord } from "@logtape/logtape"

const inMemoryRecords: LogRecord[] = []

export function configureMemoryLogger() {
  configureSync({
    loggers: [
      {
        category: [],
        lowestLevel: "debug",
        sinks: ["inMemory"],
      },
      {
        category: ["logtape", "meta"],
        lowestLevel: "warning",
        sinks: ["inMemory"],
      },
    ],
    reset: true,
    sinks: {

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kernelwhisperer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #81 on August 13, 2025 16:05.