12345678910111213141516171819202122232425262728293031323334 |
- // Logging utility
- const chalk = require('chalk')
- module.exports = {
- info(message) {
- console.log(
- chalk.bgWhite.black(" INFO "),
- message.replace(/\n/g, '\n ')
- )
- },
- ok(message) {
- console.log(
- chalk.bgGreen.black(" OK "),
- chalk.green(message.replace(/\n/g, '\n '))
- )
- },
- warning(message) {
- console.log(
- chalk.bgYellow.black(" WARN "),
- chalk.yellow(message.replace(/\n/g, '\n '))
- )
- },
- critical(message) {
- console.log(
- chalk.bgRed.white(" CRIT "),
- chalk.red(message.replace(/\n/g, '\n '))
- )
- },
- }
|