> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LogStream

***

# Class: LogStream

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

Represents a log stream instance with instance methods.

## Constructors

### Constructor

```ts theme={null}
new LogStream(logStream: LogStreamType): LogStream;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

#### Parameters

##### logStream

[`LogStreamType`](/sdk-api/typescript/reference/types/type-aliases/LogStreamType)

#### Returns

`LogStream`

## Properties

### createdAt?

```ts theme={null}
optional createdAt: string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### createdBy?

```ts theme={null}
optional createdBy: null | string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### hasUserCreatedSessions?

```ts theme={null}
optional hasUserCreatedSessions: boolean;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### id

```ts theme={null}
id: string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### name

```ts theme={null}
name: string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### projectId

```ts theme={null}
projectId: string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

***

### updatedAt?

```ts theme={null}
optional updatedAt: string;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

## Methods

### enableMetrics()

```ts theme={null}
enableMetrics(metrics: (
  | string
  | Metric
| LocalMetricConfig)[]): Promise<LocalMetricConfig[]>;
```

Defined in: [src/entities/log-streams.ts](https://github.com/rungalileo/galileo-js/blob/main/src/entities/log-streams.ts)

Enables metrics directly on this log stream instance.

#### Parameters

##### metrics

(
\| `string`
\| [`Metric`](/sdk-api/typescript/reference/types/interfaces/Metric)
\| [`LocalMetricConfig`](/sdk-api/typescript/reference/types/interfaces/LocalMetricConfig))\[]

List of metrics to enable on this log stream. Can include GalileoMetrics const object values, string names, Metric objects, or LocalMetricConfig objects with scorerFn for client-side scoring.

#### Returns

`Promise`\<[`LocalMetricConfig`](/sdk-api/typescript/reference/types/interfaces/LocalMetricConfig)\[]>

A promise that resolves to the list of local metric configurations that need client-side processing.
