Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Better defaulting to NEXT_PUBLIC_LOGGER_LEVEL=4 (#16900)

Alex van Andel182d0fa228d1
diff --git a/packages/lib/logger.ts b/packages/lib/logger.ts
index 7f00bfbdb04..d9f22f3a45e 100644
--- a/packages/lib/logger.ts
+++ b/packages/lib/logger.ts
@@ -3,12 +3,12 @@ import { Logger } from "tslog";
import { IS_PRODUCTION } from "./constants";
const logger = new Logger({
- minLevel: parseInt(process.env.NEXT_PUBLIC_LOGGER_LEVEL ?? "4"),
+ minLevel: parseInt(process.env.NEXT_PUBLIC_LOGGER_LEVEL || "4"),
maskValuesOfKeys: ["password", "passwordConfirmation", "credentials", "credential"],
prettyLogTimeZone: IS_PRODUCTION ? "UTC" : "local",
prettyErrorStackTemplate: " • {{fileName}}\t{{method}}\n\t{{filePathWithLine}}", // default
prettyErrorTemplate: "\n{{errorName}} {{errorMessage}}\nerror stack:\n{{errorStack}}", // default
- prettyLogTemplate: "{{hh}}:{{MM}}:{{ss}}:{{ms}}\t{{logLevelName}}", // default with exclusion of `{{filePathWithLine}}`
+ prettyLogTemplate: "{{hh}}:{{MM}}:{{ss}}:{{ms}} [{{logLevelName}}] ", // default with exclusion of `{{filePathWithLine}}`
stylePrettyLogs: true,
prettyLogStyles: {
name: "yellow",