How to use the xdl.Logger.global function in xdl

To help you get started, we’ve selected a few xdl 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 expo / xde / src / ui / MainScreen.js View on Github external
let notificationOptions = {
            indefinite: !!chunk.indefinite,
          };

          if (chunk.level <= bunyan.INFO) {
            this._showNotification('info', chunk.msg, notificationOptions);
          } else {
            this._showNotification('warning', chunk.msg, notificationOptions);
          }
        },
      },
      type: 'raw',
    });

    Logger.global.addStream({
      stream: {
        write: chunk => {
          this._appendLogChunk(chunk);
        },
      },
      type: 'raw',
    });
  }
}
github expo / exp / src / exp.js View on Github external
}

        if (chunk.level === bunyan.INFO) {
          log(chunk.msg);
        } else if (chunk.level === bunyan.WARN) {
          log.warn(chunk.msg);
        } else if (chunk.level >= bunyan.ERROR) {
          log.error(chunk.msg);
        }
      },
    },
    type: 'raw',
  };

  Logger.notifications.addStream(stream);
  Logger.global.addStream(stream);
}
github expo / xde / src / ui / MainScreen.js View on Github external
_sendDiagnosticsReportClicked = async () => {
    Logger.global.info('Generating diagnostics report...');
    let { url } = await Diagnostics.getDeviceInfoAsync({
      uploadLogs: true,
    });
    Logger.global.info(`Uploaded report! Send this url to the Expo team: ${url}`);
  };
github expo / exp / src / exp.js View on Github external
}

        if (chunk.level === bunyan.INFO) {
          log(chunk.msg);
        } else if (chunk.level === bunyan.WARN) {
          log.warn(chunk.msg);
        } else if (chunk.level >= bunyan.ERROR) {
          log.error(chunk.msg);
        }
      },
    },
    type: 'raw',
  };

  Logger.notifications.addStream(stream);
  Logger.global.addStream(stream);
}
github expo / xde / src / ui / MainScreen.js View on Github external
_sendDiagnosticsReportClicked = async () => {
    Logger.global.info('Generating diagnostics report...');
    let { url } = await Diagnostics.getDeviceInfoAsync({
      uploadLogs: true,
    });
    Logger.global.info(`Uploaded report! Send this url to the Expo team: ${url}`);
  };
github expo / xde / src / ui / App.js View on Github external
isLoading: false,
              });
              return;
          }

          if (chunk.level <= bunyan.INFO) {
            this._showNotification('info', chunk.msg);
          } else {
            this._showNotification('warning', chunk.msg);
          }
        },
      },
      type: 'raw',
    });

    Logger.global.addStream({
      stream: {
        write: (chunk) => {
          this._appendLogChunk(chunk);
        },
      },
      type: 'raw',
    });
  }
}