## Stream build logs

`client.build.logs(stringbuildID, RequestOptionsoptions?): StreamChunk | Stream<StreamChunk>`

**get** `/v5/builds/{build_id}/logs`

Stream a build's logs as Server-Sent Events.

The response has content-type `text/event-stream`; each event carries one log line as an
`AgentexCloudBuildLogLine` object, delivered as lines become available from the cloud build provider.
The stream ends when the provider stops producing output. Responds with a not-found error if no such
build exists for the caller's account.

### Parameters

- `buildID: string`

### Returns

- `StreamChunk`

  A single log line from the build process.

  - `line: string`

    The log line content

### Example

```typescript
import SGPClient from 'scale-gp';

const client = new SGPClient({
  accountID: 'My Account ID',
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

const streamChunk = await client.build.logs('build_id');

console.log(streamChunk.line);
```

#### Response

```json
{
  "line": "line"
}
```
