How to use the loglevelnext/dist/loglevelnext.factories function in loglevelnext

To help you get started, we’ve selected a few loglevelnext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / SBNext / core / logger / browser.js View on Github external
import loglevel from 'loglevelnext/dist/loglevelnext';

const { MethodFactory } = loglevel.factories;
const css = {
  prefix:
    'color: #999; padding: 0 0 0 20px; line-height: 16px; background: url(https://cdn.rawgit.com/storybooks/press/2a20efb6/logo/v3/icon.svg) no-repeat; background-size: 16px 16px; background-position: 0 -2px;',
  reset: 'color: #444',
};
const log = loglevel.getLogger({ name: 'sb', id: 'storybook' });

log.level = 'info';

function IconFactory(logger) {
  MethodFactory.call(this, logger);
}

IconFactory.prototype = Object.create(MethodFactory.prototype);
IconFactory.prototype.constructor = IconFactory;

loglevelnext

A modern logging library for Node.js and modern browsers that provides log level mapping to the console

MPL-2.0
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis