fix: Better defaulting to NEXT_PUBLIC_LOGGER_LEVEL=4 (#16900)
* fix: Better defaulting to NEXT_PUBLIC_LOGGER_LEVEL=4 * chore: Minor fixes to prettyLogTemplate (as it wasnt very pretty)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user