-
Notifications
You must be signed in to change notification settings - Fork 0
Logger.default
Logger.default
• new default(name)
| Name | Type |
|---|---|
name |
string |
• Private Readonly name: string
▪ Static Readonly ansi: Readonly<{ background: { black: string = "\x1b[40m"; blue: string = "\x1b[44m"; bright: { black: string = "\x1b[40;1m"; blue: string = "\x1b[44;1m"; cyan: string = "\x1b[46;1m"; green: string = "\x1b[42;1m"; magenta: string = "\x1b[45;1m"; red: string = "\x1b[41;1m"; white: string = "\x1b[47;1m"; yellow: string = "\x1b[43;1m" } ; cyan: string = "\x1b[46m"; green: string = "\x1b[42m"; magenta: string = "\x1b[45m"; red: string = "\x1b[41m"; white: string = "\x1b[47m"; yellow: string = "\x1b[43m" } ; format: { blink: string = "\x1b[5m"; bold: string = "\x1b[1m"; dim: string = "\x1b[2m"; hidden: string = "\x1b[8m"; reset: string = "\x1b[0m"; reverse: string = "\x1b[7m"; underline: string = "\x1b[4m" } ; text: { black: string = "\x1b[30m"; blue: string = "\x1b[34m"; bright: { black: string = "\x1b[30;1m"; blue: string = "\x1b[34;1m"; cyan: string = "\x1b[36;1m"; green: string = "\x1b[32;1m"; magenta: string = "\x1b[35;1m"; red: string = "\x1b[31;1m"; white: string = "\x1b[37;1m"; yellow: string = "\x1b[33;1m" } ; cyan: string = "\x1b[36m"; green: string = "\x1b[32m"; magenta: string = "\x1b[35m"; red: string = "\x1b[31m"; white: string = "\x1b[37m"; yellow: string = "\x1b[33m" } }>
ANSI escape codes
▪ Static Readonly level: Record<string, string>
Level formatting
▸ debug(message, ...obj?): void
Log debug message
| Name | Type | Description |
|---|---|---|
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ error(message, ...obj?): void
Log error message
| Name | Type | Description |
|---|---|---|
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ Private format(level, message): string
Format string with log level and prefix
| Name | Type | Description |
|---|---|---|
level |
Level |
Log level |
message |
string |
Message to format |
string
▸ info(message, ...obj?): void
Log info message
| Name | Type | Description |
|---|---|---|
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ log(level, message, ...obj?): void
Log message
| Name | Type | Description |
|---|---|---|
level |
Level |
Log level |
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ Private send(...obj): void
Print object without any log level
| Name | Type | Description |
|---|---|---|
...obj |
any[] |
Object to print |
void
▸ success(message, ...obj?): void
Log success message
| Name | Type | Description |
|---|---|---|
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ warn(message, ...obj?): void
Log warning message
| Name | Type | Description |
|---|---|---|
message |
string |
Message to log |
...obj? |
any[] |
Objects to print |
void
▸ Static background256(colour): string
256 colors
| Name | Type | Description |
|---|---|---|
colour |
number |
Colour ID from 0 to 255 |
string
▸ Static backgroundRGB(red, green, blue): string
RGB colors
| Name | Type | Description |
|---|---|---|
red |
number |
Red value from 0 to 255 |
green |
number |
Green value from 0 to 255 |
blue |
number |
Blue value from 0 to 255 |
string
▸ Static text256(colour): string
256 colors
| Name | Type | Description |
|---|---|---|
colour |
number |
Colour ID from 0 to 255 |
string
▸ Static textRGB(red, green, blue): string
RGB colors
| Name | Type | Description |
|---|---|---|
red |
number |
Red value from 0 to 255 |
green |
number |
Green value from 0 to 255 |
blue |
number |
Blue value from 0 to 255 |
string