How to use the electron-log.verbose function in electron-log

To help you get started, we’ve selected a few electron-log 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 HR / Crypter / app / core / crypto.js View on Github external
fs.remove(tempd, (err) => {
                  if (err) reject(err)
                  // return all the credentials and parameters used for encryption
                  logger.verbose('Successfully deleted tempd!')
                  resolve({
                    salt: dcreds.salt,
                    key: dcreds.key,
                    cryptpath: tarDestPath,
                    tag: tag,
                    iv: iv
                  })
                })
              })
github HR / Crypter / app / index.js View on Github external
app.on('window-all-closed', () => {
  logger.verbose('APP: window-all-closed event emitted')
  // On macOS it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
})
github autonomoussoftware / metronome-wallet-desktop / public / main / plugins / ethWallet / index.js View on Github external
.exec(function (err, transactions) {
        // TODO handle error
        if (err) {
          logger.error('Error getting data from db', err.message, err)
          return
        }

        logger.verbose(transactions.map(t => t.transaction.hash))

        sendWalletStateChange({ webContents,
          walletId,
          address,
          data: {
            transactions
          },
          log: 'Transactions' })
      })
  })
github autonomoussoftware / metronome-wallet-desktop / public / main / plugins / ethWallet / index.js View on Github external
function sendWalletStateChange ({ webContents, walletId, address, data, log }) {
  pendingWalletStateChanges.push({
    webContents,
    log: [log],
    data: {
      [walletId]: {
        addresses: {
          [address]: data
        }
      }
    }
  })
  logger.verbose(`<-//- ${log} queued`)
  sendPendingWalletStateChanges()
}
github symphonyoss / SymphonyElectron / src / common / logger.ts View on Github external
private log(logLevel: LogLevel, message: string, data: any[] = []): void {
        if (data && data.length > 0) {
            data.forEach((param) => {
                message += `, '${param && typeof param}': ${JSON.stringify(param)}`;
            });
        }
        if (!isElectronQA) {
            switch (logLevel) {
                case 'error': electronLog.error(message); break;
                case 'warn': electronLog.warn(message); break;
                case 'info': electronLog.info(message); break;
                case 'verbose': electronLog.verbose(message); break;
                case 'debug': electronLog.debug(message); break;
                case 'silly': electronLog.silly(message); break;
                default: electronLog.info(message);
            }
        }
        this.sendToCloud(this.formatLogMsg(logLevel, message));
    }
github autonomoussoftware / metronome-wallet-desktop / public / main / plugins / ethWallet / index.js View on Github external
.then(function () {
      logger.verbose('Clear cache success')
      restart(1)
    })
    .catch(err => logger.error('Clear cache failed: ', err))
github ZeusWPI / MOZAIC / planetwars / client / app / main / window.ts View on Github external
window.webContents.on('did-finish-load', () => {
    window.show();
    if (process.env.NODE_ENV === 'production') {
      window.focus();
    }
    log.verbose('[STARTUP] Webcontent finished loading');
  });
}
github autonomoussoftware / metronome-wallet-desktop / public / main / client / auth.js View on Github external
.then(function (isValid) {
      if (isValid) {
        logger.verbose('Supplied password is valid')
      } else {
        logger.warn('Supplied password is invalid')
      }
      return isValid
    })
    .catch(function (err) {
github autonomoussoftware / metronome-wallet-desktop / public / main / plugins / ethWallet / index.js View on Github external
.then(function (bestBlock) {
      if (webContents.isDestroyed()) { return }

      webContents.send('eth-block', bestBlock)
      logger.verbose('<-- Current best block', bestBlock)
    })
    .catch(function (err) {
github autonomoussoftware / metronome-wallet-desktop / public / main / plugins / tokens / api.js View on Github external
function callTokenMethod (method, args, waitForReceipt) {
    const { password, token, from, to, value, gasPrice, gasLimit } = args

    logger.verbose(`Calling ${method} of ERC20 token`, {
      from,
      to,
      value,
      token,
      gasLimit,
      gasPrice
    })

    const web3 = ethWallet.getWeb3()
    const contract = new web3.eth.Contract(abi, token)
    const call = contract.methods[method](to, value)
    const data = call.encodeABI()

    return ethWallet.sendTransaction(
      { password, from, to: token, data, gasPrice, gasLimit },
      waitForReceipt