From ce6aca40ccab7573b1384d69b8cd0d8898b1fc1d Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 26 Jan 2024 12:40:41 +0100 Subject: [PATCH] fix: logger error --- .changeset/big-guests-judge.md | 5 +++++ packages/core/lib/defaultLogger.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/big-guests-judge.md diff --git a/.changeset/big-guests-judge.md b/.changeset/big-guests-judge.md new file mode 100644 index 00000000..37e2ce06 --- /dev/null +++ b/.changeset/big-guests-judge.md @@ -0,0 +1,5 @@ +--- +"barnard59-core": patch +--- + +Using anylogger caused errors when calling without a level diff --git a/packages/core/lib/defaultLogger.ts b/packages/core/lib/defaultLogger.ts index def52d7b..0f965af3 100644 --- a/packages/core/lib/defaultLogger.ts +++ b/packages/core/lib/defaultLogger.ts @@ -74,6 +74,7 @@ function factory({ console = true, errorFilename = null, filename = null, level return ((logger)[method] || logger.debug)(...args) } } + facade.log = facade.debug return facade }