-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDeepDark.ts
50 lines (47 loc) · 1.82 KB
/
DeepDark.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { createLogger } from "@lvksh/logger";
import chalk from "chalk";
const log = createLogger(
{
http: chalk.gray`[HTTP]`,
data: {
label: chalk.black`\{` + chalk.yellowBright`DB` + chalk.black`\}`,
newLine: chalk.yellowBright.bold`┣━`,
newLineEnd: chalk.yellow.bold`┗━`,
},
error: {
label: "[" + chalk.bgRed.white`ERROR` + "]",
paddingChar: chalk.red.bold`━`,
divider: chalk.red.bold`|`,
newLine: chalk.red.bold`┣━`,
newLineEnd: chalk.red.bold`┗━`,
},
debug: {
label: chalk.magenta.bold`(DEBUG)`,
paddingChar: chalk.magenta.bold`~`,
divider: chalk.magenta.bold`?`,
newLine: chalk.magenta.bold`|`,
newLineEnd: chalk.magenta.bold`\\`,
},
info: {
label: "[" + chalk.blue`INFO` + "]",
paddingChar: chalk.blue`:`,
divider: chalk.blue.bold`>`,
newLine: chalk.blue.bold`┣━`,
newLineEnd: chalk.blue.bold`┗━`,
},
test: {
label: () => { return chalk.white`<TEST>:` + new Date().toLocaleTimeString().replace(/(AM|PM)/, "",).trim() },
paddingChar: "-",
divider: chalk.white.bold`|`,
newLine: chalk.white.bold`┣━`,
newLineEnd: chalk.white.bold`┗━`,
},
},
{ padding: "APPEND", divider: chalk.greenBright`>`, paddingChar: ":" },
);
log.http("Serving /hello");
log.data("Fetching user 01", "with extra info", "hello");
log.info("Succesful connection", "Continuing cycle", "Cycle complete")
log.test("Test log", "Testing Now...", "Testing succesful");
log.debug("This log is here", "Here", "And here...")
log.error("BIG ERROR OOF ASTLEY WAS HERE", "hello", "world");