How to use the electron-log.debug 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 blockchain-desktop / hyperledger-fabric-desktop / src / components / content / CARegisterContent.jsx View on Github external
.then((secret) => {
        // 输出密码,到页面上。
        self.setState({ registerResult: secret });
        logger.debug('register successfully, secret: ', secret);
      })
      .catch((err) => {
github FlashAirDevelopers / FlashAirFileManager / src / renderer / view / filer.js View on Github external
render(templateVar) {
    log.debug('render');
    // filter current local directory files
    if (templateVar.localFiles && templateVar.localFiles.length > 0) {
      const tmpLocalFiles = templateVar.localFiles.filter(dir => {
        return dir.path === templateVar.localCurDir;
      })[0];
      if (tmpLocalFiles && tmpLocalFiles.files) {
        tmpLocalFiles.files.forEach((file, index, array) => {
          if (file.modification && (file.modification instanceof Date)) {
            array[index].modification = dateFormat.format(file.modification, 'yyyy/MM/dd');
          }
        });
        templateVar.localFiles = tmpLocalFiles.files;
      }
    }
    // filter current FlashAir directory files
    if (templateVar.remoteFiles && templateVar.remoteFiles.length > 0) {
github fakob / MoviePrint_v004 / app / containers / App.js View on Github external
updatecontainerWidthAndHeight() {
    // wrapped in try catch as in a global error case this.siteContent ref is not set
    try {
      const containerWidthInner =
        this.siteContent.clientWidth -
        (this.props.visibilitySettings.showMovielist ? 350 : 0) -
        (this.props.visibilitySettings.showSettings ? 350 : 0) -
        (this.props.file ? 0 : 700); // for startup
      const containerHeightInner = this.siteContent.clientHeight -
        (this.props.file ? 0 : 100); // for startup
      if ((Math.abs(this.state.containerHeight - containerHeightInner) > 10) ||
      (Math.abs(this.state.containerWidth - containerWidthInner) > 10)) {
        log.debug(`new container size: ${containerWidthInner}x${containerHeightInner}`);
        this.setState({
          containerHeight: containerHeightInner,
          containerWidth: containerWidthInner
        }, () => this.updateScaleValue());
      }
      return true;
    } catch (e) {
      log.error(e);
      return undefined;
    }
  }
github FlashAirDevelopers / FlashAirFileManager / src / renderer / view / filer.js View on Github external
appMain.store.on(AppEvent.REQUEST_REMOTE_FILE_LIST, state => {
      log.debug(AppEvent.REQUEST_REMOTE_FILE_LIST);
      // Show spinner for fetching FlashAir file list
      this.render(Object.assign(this.baseTemplateVar, state));
    });
    appMain.store.on(AppEvent.REQUEST_REMOTE_FILE_LIST_FAILURE, state => {
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 blockchain-desktop / hyperledger-fabric-desktop / src / components / content / CARegisterContent.jsx View on Github external
.then((client) => {
        logger.debug('start to enroll, request: ', req);
        return client.enroll(req);
      })
      .then((enrollment) => {
github DST-Tools / DSTEd / Source / Classes / Logger.js View on Github external
this.debug = function debug() {
		_logger.debug(arguments);
	};
github neXenio / adb-util / adb / device-manager.js View on Github external
onDeviceAdded(adbKitDevice) {
    let device = this.getDevice(adbKitDevice);
    Object.assign(device, adbKitDevice);
    device.onConnect();
    log.debug('Device added: ' + device.id);
    this.dispatch(actions.deviceAdded(device));
    //ipcRenderer.send('adbkit-update-device-features', device);
    ipcRenderer.send('adbkit-update-device', device);
  }
github kmteras / timenaut / src / services / settings.ts View on Github external
if (key in this.settings) {
            return this.settings[key];
        }

        const sql = `SELECT value
                     FROM settings
                     WHERE key = ?
                       AND metadata = FALSE`;
        let value = await Database.db.one(sql, [key]);
        if (value === undefined) {
            value = null;
        } else {
            value = value['value'];
        }
        this.settings[key] = value;
        log.debug(`Fetched setting ${key} with value ${value}`);
        return value;
    }
github iffy / lhtml / src / rpc.js View on Github external
response_received(event, response) {
    log.info(`RPC[${response.id}] response`);
    log.debug(`RPC[${response.id}] <- response`, response);
    var handler = this._pending[response.id];
    delete this._pending[response.id];
    if (response.error) {
      handler.reject(response.error);
    } else {
      handler.resolve(response.result);
    }
  }
}