1 parent
a9b45c1057
commit
5c4a9c32d1
4 files changed
+326
-278
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { Logger } from "tslog";
|
||||
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
|
||||
const logger = new Logger({
|
||||
dateTimePattern: "hour:minute:second.millisecond timeZoneName",
|
||||
displayFunctionName: false,
|
||||
displayFilePath: "hidden",
|
||||
dateTimeTimezone: isProduction ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
prettyInspectHighlightStyles: {
|
||||
name: "yellow",
|
||||
number: "blue",
|
||||
bigint: "blue",
|
||||
boolean: "blue",
|
||||
},
|
||||
maskValuesOfKeys: ["password", "passwordConfirmation", "credentials", "credential"],
|
||||
exposeErrorCodeFrame: !isProduction,
|
||||
});
|
||||
|
||||
export default logger;
|
||||
Reference in new issue
Block a user