How to use the blgr.levelsByVal function in blgr

To help you get started, we’ve selected a few blgr 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 handshake-org / hsd / browser / src / app.js View on Github external
logger.writeConsole = function writeConsole(level, module, args) {
  const name = Logger.levelsByVal[level];
  const msg = this.fmt(args, false);

  if (++scrollback > 1000) {
    log.innerHTML = '';
    scrollback = 1;
  }

  const now = Math.floor(Date.now() / 1000);

  log.innerHTML += `<span style="color:blue;">${now}</span> `;

  if (name === 'error') {
    log.innerHTML += `<span style="color:red;">[${name}] `;
    if (module)
      log.innerHTML += `(${module}) `;
    log.innerHTML += '</span>';

blgr

Logger for node.js

MIT
Latest version published 8 months ago

Package Health Score

56 / 100
Full package analysis

Popular blgr functions