[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Console](https://evolu.dev/docs/api-reference/common/Console) › ConsoleStoreOutput

Defined in: [packages/common/src/Console.ts:345](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Console.ts#L345)

A [ConsoleOutput](https://evolu.dev/docs/api-reference/common/Console/interfaces/ConsoleOutput) that stores the latest entry in a
[ReadonlyStore](https://evolu.dev/docs/api-reference/common/Store/interfaces/ReadonlyStore).

Subscribe to [ConsoleStoreOutput.entry](https://evolu.dev/docs/api-reference/common/Console/interfaces/ConsoleStoreOutput#entry) to observe all log entries.

### Example

```ts
import {
  assertOk,
  createConsole,
  createConsoleStoreOutput,
  Data,
  type ConsoleEntry,
} from "@evolu/common";

const storeOutput = createConsoleStoreOutput();
const console = createConsole({ output: storeOutput });
let forwardedEntry: ConsoleEntry | null = null;
const unsubscribe = storeOutput.entry.subscribe(() => {
  forwardedEntry = storeOutput.entry.get();
});

console.child("relay").info("connected");
unsubscribe();

assertOk(Data.fromUnknown(forwardedEntry), {
  method: "info",
  path: ["relay"],
  args: ["connected"],
});
```

## Extends

- [`ConsoleOutput`](https://evolu.dev/docs/api-reference/common/Console/interfaces/ConsoleOutput)

## Properties

<a id="entry"></a>

### entry

```ts
readonly entry: ReadonlyStore<
  | ConsoleEntry
| null>;
```

Defined in: [packages/common/src/Console.ts:347](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Console.ts#L347)

Latest entry written to this output.

---

<a id="write"></a>

### write

```ts
readonly write: (entry: ConsoleEntry, formatter?: ConsoleFormatter) => void;
```

Defined in: [packages/common/src/Console.ts:248](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Console.ts#L248)

Write a log entry to this output.

#### Inherited from

[`ConsoleOutput`](https://evolu.dev/docs/api-reference/common/Console/interfaces/ConsoleOutput).[`write`](https://evolu.dev/docs/api-reference/common/Console/interfaces/ConsoleOutput#write)