UNPKG

@athenna/core

Version:

One foundation for multiple applications.

48 lines (47 loc) 1.17 kB
/** * @athenna/core * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import { Color } from '@athenna/common'; export class Logger { /** * Write a message to the stdout. */ static write(...args) { process.stdout.write(args.join(' ') + '\n'); } /** * Write a message to the stdout in red color. */ static red(...args) { Logger.write(Color.red(args.join(' '))); } /** * Write a message to the stdout in gray color. */ static gray(...args) { Logger.write(Color.gray(args.join(' '))); } /** * Write a message to the stdout in green color. */ static green(...args) { Logger.write(Color.green(args.join(' '))); } /** * Write a message to the stdout in purple color. */ static purple(...args) { Logger.write(Color.purple(args.join(' '))); } /** * Write a message to the stdout in yellow color. */ static yellow(...args) { Logger.write(Color.yellow(args.join(' '))); } }