Allows to override default debug level for logger (#6300)
parent
f72f709e34
commit
b77ce4a010
|
@ -3,8 +3,8 @@ import { Logger } from "tslog";
|
||||||
import { IS_PRODUCTION } from "./constants";
|
import { IS_PRODUCTION } from "./constants";
|
||||||
|
|
||||||
const logger = new Logger({
|
const logger = new Logger({
|
||||||
minLevel: "warn",
|
minLevel: !!process.env.NEXT_PUBLIC_DEBUG ? "debug" : "warn",
|
||||||
dateTimePattern: "hour:minute:second.millisecond timeZoneName",
|
dateTimePattern: "hour:minute:second.millisecond",
|
||||||
displayFunctionName: false,
|
displayFunctionName: false,
|
||||||
displayFilePath: "hidden",
|
displayFilePath: "hidden",
|
||||||
dateTimeTimezone: IS_PRODUCTION ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
|
dateTimeTimezone: IS_PRODUCTION ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||||
|
|
Loading…
Reference in New Issue