Skip to content

Instantly share code, notes, and snippets.

@Inplex-sys
Created March 23, 2023 00:36
Show Gist options
  • Save Inplex-sys/1b8d942c671b5d6a45f3f5d25f7b03d6 to your computer and use it in GitHub Desktop.
Save Inplex-sys/1b8d942c671b5d6a45f3f5d25f7b03d6 to your computer and use it in GitHub Desktop.
import chalk from 'chalk';
class Logs {
static Info( message ) {
console.log(chalk.hex('#d6af42')(Utils.formatConsoleDate(new Date())) + chalk.cyan('[INFO] ') + message);
}
static Error( message ) {
console.log(chalk.hex('#d6af42')(Utils.formatConsoleDate(new Date())) + chalk.red('[ERROR] ') + message);
}
static Success( message ) {
console.log(chalk.hex('#d6af42')(Utils.formatConsoleDate(new Date())) + chalk.green('[SUCCESS] ') + message);
}
static Warning( message ) {
console.log(chalk.hex('#d6af42')(Utils.formatConsoleDate(new Date())) + chalk.yellow('[WARNING] ') + message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment