diff --git a/packages/shared/src/log.ts b/packages/shared/src/log.ts index b18df2bf8..fecdcaae2 100644 --- a/packages/shared/src/log.ts +++ b/packages/shared/src/log.ts @@ -31,6 +31,8 @@ const defaultOpts = { level: 'debug' }; export const LogConfig = { /** Get the currently configured logger */ get(): LogType { + // If this .get() is called inside a async function eg a HTTP request + // use the logger from the async context if it has one const localStorage = LogStorage.getStore()?.log; if (localStorage) return localStorage;