How to use the loglevel.error function in loglevel

To help you get started, we’ve selected a few loglevel 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 antonycourtney / tabli / archive / src / js / renderCommon.js View on Github external
} else {
                log.log(
                    'doRender: nextStore.equals(savedStore) -- skipping setValue'
                );
            }

            // logHTML("Updated savedHTML", renderedString)
            var tPostSyncUpdate = performance.now();
            log.info(
                'syncChromeWindows and update complete: ',
                tPostSyncUpdate - tPreRender,
                ' ms'
            );
        }
    } catch (e) {
        log.error('renderPopup: caught exception invoking function: ');
        log.error(e.stack);
        throw e;
    }
}
github brave / ethereum-remote-client / app / scripts / controllers / transactions / pending-tx-tracker.js View on Github external
async updatePendingTxs () {
    // in order to keep the nonceTracker accurate we block it while updating pending transactions
    const nonceGlobalLock = await this.nonceTracker.getGlobalLock()
    try {
      const pendingTxs = this.getPendingTransactions()
      await Promise.all(pendingTxs.map((txMeta) => this._checkPendingTx(txMeta)))
    } catch (err) {
      log.error('PendingTransactionTracker - Error updating pending transactions')
      log.error(err)
    }
    nonceGlobalLock.releaseLock()
  }
github mlaursen / react-md / packages / dev-utils / src / sassdoc.ts View on Github external
${code}
`;

  try {
    return format(
      renderSync({
        data,
        includePaths: [tempStylesDir],
      }).css.toString(),
      "css"
    );
  } catch (e) {
    log.error("Unable to compile an example with the following code:");
    log.error(code);
    log.error();
    log.error(e.message);
    process.exit(1);
  }
}
github aerogear / offix / packages / core / src / config / ConfigurationService.ts View on Github external
public getConfigById(id: string): ServiceConfiguration | undefined {
    if (this.configurations) {
      return find(this.configurations, service => {
        return !!service.id && service.id.toLowerCase() === id.toLowerCase();
      });
    }
    console.error("Configuration not initialized.");
  }
}
github bitoiu / repo-visibility-alert-action / src / notify.js View on Github external
resolveWithFullResponse: true,
    headers: {
      'User-Agent': 'https://github.com/bitoiu',
      'Accept': 'application/vnd.github.v3+json'
    },
    qs: {
      access_token: process.env.GH_TOKEN,
      role: 'admin'
    }
  }

  try {
    let response = await request.get(options)
    if (response.statusCode != 200) {
      if (response.statusCode != 404) {
        log.error('404 Error: Sometimes this happens when the current repository is not part of an organization, but an user account instead.')
      }
      log.error(response.statusCode)
      process.exit(1)
    }
    let owners_list = JSON.parse(response.body).map(user => user.login)
    log.trace(response.body)
    log.debug('List of owners:' + owners_list)
    return owners_list
  } catch (err) {
    log.error(err)
    process.exit(1)
  }
}
github LeagueDevelopers / lol-skins-viewer / app / store / index.renderer.js View on Github external
ipcRenderer.on('action', (event, action) => {
  if (typeof action === 'object' && action.type) {
    return store.dispatch(action);
  }
  logger.error('Received invalid action', action);
});
github aergoio / athena-ide-atom / src / container.js View on Github external
}).catch(err => {
      logger.error(err);
    });
  },
github brave / ethereum-remote-client / ui / app / components / token-list.js View on Github external
.catch((reason) => {
    log.error(`Problem updating balances`, reason)
    this.setState({ isLoading: false })
  })
}
github seashell / drago / ui / src / graphql / apollo-provider.js View on Github external
graphQLErrors.forEach(({ message, locations, path }) =>
        log.error(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
      )
github gitterHQ / desktop / nwapp / utils / notifier.js View on Github external
.catch(function(err) {
      log.error('Problem initializing notification', err, err.stack);
    });