How to use the @seagull/libraries.sendLog function in @seagull/libraries

To help you get started, we’ve selected a few @seagull/libraries 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 seagull-js / seagull / examples / helloworld / src / pages / Logging.tsx View on Github external
createStream = async () => {
    const stream = { logStreamName: 'add-log-test' }
    return (await sendLog('/log/createStream', stream)) as string
  }
}
github seagull-js / seagull / examples / helloworld / src / pages / Logging.tsx View on Github external
onClick = async () => {
    this.fullStreamName = this.fullStreamName || (await this.createStream())
    const log: AddLogRequest = {
      log: 'HIT!',
      logStreamName: this.fullStreamName,
      sequenceToken: this.sequenceToken,
    }

    const result = await sendLog('/log/addLog', log)
    this.sequenceToken = result.nextSequenceToken
  }