Logger provides convenient functions for the logging.

Logger uses util.format for the text formatting.

import { Logger } from 'dripcap';

Logger.info('%s:%s', 'hello', 'world');

Actually, Logger is just a wrapper for PubSub.pub('core:log', ...).

It is also possible to emit a log massage directly with PubSub.pub.

// Implementation of Logger.info(format[, ...args])
info() {
  let msg = util.format.apply(this, arguments);
  PubSub.pub('core:log', {
    level: 'info',
    message: msg,
    timestamp: new Date()

Class Methods

Logger.debug(format[, ...args])

  • format String

Logger.info(format[, ...args])

  • format String

Logger.warn(format[, ...args])

  • format String

Logger.error(format[, ...args])

  • format String

results matching ""

    No results matching ""