const colors = require ( 'colors' ) ; export class Log { static infoTitle ( message ) { console . log ( colors . bold . black . bgCyan ( message ) ) ; } static successTitle ( message ) { console . log ( colors . bold . black . bgGreen ( message ) ) ; } static errorTitle ( message ) { console . log ( colors . bold . black . bgRed ( this . prefixWithTime ( message ) ) ) ; } static warningTitle ( message ) { console . log ( colors . bold . black . bgYellow ( this . prefixWithTime ( message ) ) ) ; } static clusterTitle ( message ) { console . log ( colors . bold . yellow . bgMagenta ( this . prefixWithTime ( message ) ) ) ; } static httpTitle ( message ) { this . infoTitle ( this . prefixWithTime ( message ) ) ; } static discoverTitle ( message ) { console . log ( colors . bold . gray . bgBrightCyan ( this . prefixWithTime ( message ) ) ) ; } static websocketTitle ( message ) { this . successTitle ( this . prefixWithTime ( message ) ) ; } static webhookSenderTitle ( message ) { console . log ( colors . bold . blue . bgWhite ( this . prefixWithTime ( message ) ) ) ; } static info ( message ) { console . log ( colors . cyan ( message ) ) ; } static success ( message ) { console . log ( colors . green ( message ) ) ; } static error ( message ) { console . log ( colors . red ( message ) ) ; } static warning ( message ) { console . log ( colors . yellow ( message ) ) ; } static cluster ( message ) { console . log ( colors . bold . magenta ( message ) ) ; } static http ( message ) { this . info ( message ) ; } static discover ( message ) { console . log ( colors . bold . brightCyan ( message ) ) ; } static websocket ( message ) { this . success ( message ) ; } static webhookSender ( message ) { console . log ( colors . bold . white ( message ) ) ; } protected static prefixWithTime ( message ) { if ( typeof message === 'string' ) { return '[' + ( new Date ) . toString ( ) + '] ' + message ; } return message ; } }