Task: Fixed ts common package

This commit is contained in:
2021-12-22 16:30:34 +07:00
parent e26ee50faf
commit 596d6e92d2
4 changed files with 18 additions and 77 deletions

View File

@@ -1,8 +1,7 @@
import chalk from "chalk"
import { formatDate } from "../date"
import Logger from "./writter"
let logger = Logger.getProvider()
const logger = console
const prefixColor = (
prefix: string,
@@ -10,10 +9,6 @@ const prefixColor = (
color: string = "green"
) => {
const timestamp = formatDate(new Date())
if (Logger.isEnabled()) {
return `[${timestamp}] - ${prefix}: ${message}`
}
const firstStep = chalk`[${timestamp}] - {${color} ${prefix}}:`
return `${firstStep} ${message}`
}