Files
calendar/packages/lib/logger.ts
T
Hariom BalharaGitHubPeer Richelsenkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
7b1e824a36 Gegt only warn,error and fatal (#5259)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-28 09:19:48 +00:00

22 lines
621 B
TypeScript

import { Logger } from "tslog";
import { IS_PRODUCTION } from "./constants";
const logger = new Logger({
minLevel: "warn",
dateTimePattern: "hour:minute:second.millisecond timeZoneName",
displayFunctionName: false,
displayFilePath: "hidden",
dateTimeTimezone: IS_PRODUCTION ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
prettyInspectHighlightStyles: {
name: "yellow",
number: "blue",
bigint: "blue",
boolean: "blue",
},
maskValuesOfKeys: ["password", "passwordConfirmation", "credentials", "credential"],
exposeErrorCodeFrame: !IS_PRODUCTION,
});
export default logger;