fix: suppress LogTape context-local storage warning
Add AsyncLocalStorage to LogTape configure() to fix the repeated "Context-local storage is not configured" warning that appeared before every Fedify log entry. Also remove unused getLogger import.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* and inbox.js with Fedify's battle-tested implementations.
|
||||
*/
|
||||
|
||||
import { AsyncLocalStorage } from "node:async_hooks";
|
||||
import { Temporal } from "@js-temporal/polyfill";
|
||||
import {
|
||||
Endpoints,
|
||||
@@ -16,7 +17,7 @@ import {
|
||||
createFederation,
|
||||
importSpki,
|
||||
} from "@fedify/fedify";
|
||||
import { configure, getConsoleSink, getLogger } from "@logtape/logtape";
|
||||
import { configure, getConsoleSink } from "@logtape/logtape";
|
||||
import { MongoKvStore } from "./kv-store.js";
|
||||
import { registerInboxListeners } from "./inbox-listeners.js";
|
||||
|
||||
@@ -45,6 +46,7 @@ export function setupFederation(options) {
|
||||
if (!_logtapeConfigured) {
|
||||
_logtapeConfigured = true;
|
||||
configure({
|
||||
contextLocalStorage: new AsyncLocalStorage(),
|
||||
sinks: {
|
||||
console: getConsoleSink(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user