Skip to content

Commit 1f9cbe8

Browse files
committed
fixup! do not depend on openNextDebug
1 parent 9bc7b1b commit 1f9cbe8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/open-next/src/adapters/logger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export function error(...args: any[]) {
5252
}
5353
if (error.logLevel === 0) {
5454
// Display the name and the message instead of full Open Next errors.
55-
return debug(
55+
// console.log is used so that logging does not depend on openNextDebug.
56+
return console.log(
5657
...args.map((arg) =>
5758
isOpenNextError(arg) ? `${arg.name}: ${arg.message}` : arg,
5859
),

packages/tests-unit/tests/adapters/logger.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,11 @@ describe("logger adapter", () => {
1313
const error = vi.spyOn(console, "error").mockImplementation(() => null);
1414

1515
beforeEach(() => {
16-
// Direct debug to console.log
17-
globalThis.openNextDebug = true;
1816
debug.mockClear();
1917
warn.mockClear();
2018
error.mockClear();
2119
});
2220

23-
afterAll(() => {
24-
globalThis.openNextDebug = false;
25-
});
26-
2721
const ignorableError = new IgnorableError("ignorable");
2822
const recoverableError = new RecoverableError("recoverable");
2923
const fatalError = new FatalError("fatal");

0 commit comments

Comments
 (0)