-
Notifications
You must be signed in to change notification settings - Fork 3
/
Sunfire.ts
38 lines (36 loc) · 1.29 KB
/
Sunfire.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
import { createLogger } from "@lvksh/logger";
import chalk from "chalk";
""
const log = createLogger(
{
server: chalk.gray`[SERVER]`,
client: {
label: "{" + chalk.yellowBright`\{CLIENT\}` + "}",
newLine: chalk.yellowBright.bold`┣━`,
newLineEnd: chalk.yellow.bold`┗━`,
},
middleware: {
label: "=[" + chalk.bgBlue.white`MIDDLE` + "]=",
paddingChar: chalk.red.bold`━`,
divider: chalk.red.bold`|`,
newLine: chalk.red.bold`┣━`,
newLineEnd: chalk.red.bold`┗━`,
},
services: {
label: chalk.magenta.bold`(SERVICES)`,
paddingChar: chalk.magenta.bold`~`,
divider: chalk.magenta.bold`?`,
newLine: chalk.magenta.bold`|`,
newLineEnd: chalk.magenta.bold`\\`,
},
error:{
label: "ERROR!",
}
},
{ padding: "APPEND", divider: chalk.greenBright`>`, paddingChar: ":" },
);
log.server("Serving /hello");
log.client("Fetching user 01", "with extra info", "hello");
log.middleware("Succesful connection", "Continuing cycle", "Cycle complete")
log.services("Test log", "Testing Now...", "Testing succesful");
log.error("BIG ERROR OOF ASTLEY WAS HERE", "hello", "world");