change log format
This commit is contained in:
parent
ad87772da9
commit
a78faf5a7c
@ -1,10 +1,16 @@
|
||||
import PhoneNumber from "awesome-phonenumber";
|
||||
import winston from "winston";
|
||||
import winston, { format } from "winston";
|
||||
|
||||
export const DEBUG = !!process.env.DEBUG;
|
||||
export const logger = winston.createLogger({
|
||||
level: DEBUG ? "debug" : process.env.LOG_LEVEL ?? "info",
|
||||
transports: [new winston.transports.Console()],
|
||||
format: format.combine(
|
||||
format.timestamp(),
|
||||
format.printf(
|
||||
({ level, message, timestamp }) => `${timestamp} [${level}]: ${message}`
|
||||
)
|
||||
),
|
||||
});
|
||||
|
||||
export function getNationalNumber(input: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user