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

# How does wandb stream logs and writes to disk?

W\&B queues events in memory and writes them to disk asynchronously. This approach handles failures and supports the `WANDB_MODE=offline` configuration, which lets you synchronize data after logging.

The terminal displays the path to the local run directory. This directory includes a `.wandb` file, which serves as the datastore. To log images, W\&B stores them in the `media/images` subdirectory before uploading them to cloud storage.

***

<Badge stroke shape="pill" color="orange" size="md">[Environment Variables](/support/models/tags/environment-variables)</Badge>
