UNPKG

@spalger/kibana

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

17 lines (13 loc) 508 B
let _ = require('lodash'); let ansicolors = require('ansicolors'); let log = _.restParam(function (color, label, rest1) { console.log.apply(console, [color(` ${_.trim(label)} `)].concat(rest1)); }); let color = require('./color'); module.exports = class Log { constructor(quiet, silent) { this.good = quiet || silent ? _.noop : _.partial(log, color.green); this.warn = quiet || silent ? _.noop : _.partial(log, color.yellow); this.bad = silent ? _.noop : _.partial(log, color.red); } };