# Add file and line number information to logs \(\#2568\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5e4da6433fcc1d24f7313d1675c8dabfef509438

Requested commit: 5e4da6433fcc1d24f7313d1675c8dabfef509438

Commit: 5e4da6433fcc1d24f7313d1675c8dabfef509438

Tree: e8af71588c1c1973a4b60ddeab139e8f61f2a25a

Author: Mikayla Maki

Committer: GitHub

## Message

```
Add file and line number information to logs (#2568)

This PR adds codegen from rustc to track the file and line number of
calls to `log_err()`. I haven't noticed much longer compile times on my
machine, and looking at the
[implementation](https://rustc-dev-guide.rust-lang.org/backend/implicit-caller-location.html)
it essentially adds an extra argument and secret reference pass.
However, this will show a lot more data in our logs on user machines.
Requesting review from @ForLoveOfCats, who usually knows a bunch about
this kind of thing :)
```

## Parents

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

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

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