# create_update_log_file

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/update_check/create_update_log_file)

Create an empty update log file and return its path.

Callers that *advertise* the log to a user — "Update log: tail -f <path>" —
must use this rather than `create_update_log_path`, which only computes a
path. `perform_upgrade` refuses some upgrades before ever spawning an
installer (unknown or unsupported install method, `brew` missing from
`PATH`, the pre-release gate), and `_run_install_subprocess` degrades to
not persisting output when the log cannot be opened. In all of those cases
the path alone would name a file that never comes into existence, leaving
the user tailing an `ENOENT`.

## Signature

```python
create_update_log_file() -> Path | None
```

## Returns

`Path | None`

The created log path, or `None` if it could not be created — callers
should then omit the log hint rather than point at a missing file.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/update_check.py#L2033)