# Suppress \`pet\` log spam when opening Python projects \(\#60204\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b083358680a69ec982bd3efdcbcd1c90e08d6b2b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b083358680a69ec982bd3efdcbcd1c90e08d6b2b

Requested commit: b083358680a69ec982bd3efdcbcd1c90e08d6b2b

Commit: b083358680a69ec982bd3efdcbcd1c90e08d6b2b

Tree: 00b2dcbfe12adb5a4d6cdae90dbe956080226b62

Author: Xin Zhao

Committer: GitHub

## Message

````
Suppress `pet` log spam when opening Python projects (#60204)

# Objective

Zed uses `pet` to auto-discover Python virtual environments. When
opening Python projects, there is a large amount of log spam from `pet`
output, which is not useful:

```
2026-07-01T22:32:07+08:00 INFO  [pet::find] find_and_report_envs; search_scope=None
2026-07-01T22:32:07+08:00 INFO  [lsp] starting language server process. binary path: "/usr/bin/ty", working directory: "/home/xin/works/test/test_python", args: ["server"]
2026-07-01T22:32:07+08:00 INFO  [pet::find] locators_phase;
2026-07-01T22:32:07+08:00 INFO  [pet::find] path_search_phase;
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=PipEnv
2026-07-01T22:32:07+08:00 INFO  [pet::find] workspace_search_phase;
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=PyEnv
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Pixi
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Conda
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Uv
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Poetry
2026-07-01T22:32:07+08:00 INFO  [pet::find] global_virtualenvs_phase;
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Venv
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=VirtualEnv
2026-07-01T22:32:07+08:00 INFO  [pet::find] find_python_environments_in_workspace_folder_recursive; workspace_folder="/home/xin/works/test/test_python" workspace=/home/xin/works/test/test_python
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=Homebrew
2026-07-01T22:32:07+08:00 INFO  [lsp] starting language server process. binary path: "/usr/bin/ruff", working directory: "/home/xin/works/test/test_python", args: ["server"]
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=LinuxGlobal
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] locator_find; locator=VirtualEnvWrapper
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=["/home/xin/works/test/test_python/.venv/bin/python"] executable_count=1
2026-07-01T22:32:07+08:00 INFO  [pet::locators] identify_python_environment_using_locators; env=PythonEnv { executable: "/home/xin/works/test/test_python/.venv/bin/python", prefix: Some("/home/xin/works/test/test_python/.venv"), version: None, symlinks: None } executable=/home/xin/works/test/test_python/.venv/bin/python
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PyEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Pixi
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Conda
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Uv
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=[] executable_count=0
2026-07-01T22:32:07+08:00 INFO  [pet::find] identify_python_executables_using_locators; executables=["/usr/bin/python", "/usr/bin/python3", "/usr/bin/python3.14"] executable_count=3
2026-07-01T22:32:07+08:00 INFO  [pet::locators] identify_python_environment_using_locators; env=PythonEnv { executable: "/usr/bin/python", prefix: None, version: None, symlinks: None } executable=/usr/bin/python
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PyEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Pixi
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Conda
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Uv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Poetry
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PipEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnvWrapper
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Venv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Homebrew
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=LinuxGlobal
2026-07-01T22:32:07+08:00 INFO  [pet::locators] resolve_python_env; executable=/usr/bin/python
2026-07-01T22:32:07+08:00 INFO  [pet::locators] identify_python_environment_using_locators; env=PythonEnv { executable: "/usr/bin/python3", prefix: None, version: None, symlinks: None } executable=/usr/bin/python3
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PyEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Pixi
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Conda
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Uv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Poetry
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PipEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnvWrapper
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Venv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Homebrew
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=LinuxGlobal
2026-07-01T22:32:07+08:00 INFO  [pet::locators] resolve_python_env; executable=/usr/bin/python3
2026-07-01T22:32:07+08:00 INFO  [pet::locators] identify_python_environment_using_locators; env=PythonEnv { executable: "/usr/bin/python3.14", prefix: None, version: None, symlinks: None } executable=/usr/bin/python3.14
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PyEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Pixi
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Conda
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Uv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Poetry
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=PipEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnvWrapper
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Venv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=VirtualEnv
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=Homebrew
2026-07-01T22:32:07+08:00 INFO  [pet::locators] try_from_locator; locator=LinuxGlobal
2026-07-01T22:32:07+08:00 INFO  [pet::locators] resolve_python_env; executable=/usr/bin/python3.14
```


This PR is intended to remove this log spam.

## Solution

Add `pet` to the default log filters. Now, `INFO` logs from `pet` are
suppressed by default.

## Testing

Tested locally, and verified that there is no longer any `pet` log spam
in the Zed logs.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


---

Release Notes:

- N/A or Added/Fixed/Improved ...
````

## Parents

- [3648fe6f19644fa4fcbd4f1db3e5888efb8269c1](https://git.cafe/gitcafe/zed/commit/3648fe6f19644fa4fcbd4f1db3e5888efb8269c1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b083358680a69ec982bd3efdcbcd1c90e08d6b2b?format=markdown)
