0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-01-21 08:27:42 +01:00
gitea/docs/content/doc/advanced
sillyguodong 5155ec35c5
Parse external request id from request headers, and print it in access log (#22906)
Close: #22890.

---
### Configure in .ini file:
```ini
[log]
REQUEST_ID_HEADERS = X-Request-ID, X-Trace-Id
```

### Params in Request Header
```
X-Trace-ID: trace-id-1q2w3e4r
```

![image](https://user-images.githubusercontent.com/33891828/218665296-8fd19a0f-ada6-4236-8bdb-f99201c703e8.png)



### Log output:

![image](https://user-images.githubusercontent.com/33891828/218665225-cc242a57-4ffc-449a-a1f6-f45ded0ead60.png)
2023-03-10 09:54:32 -06:00
..
adding-legal-pages.en-us.md
clone-filter.en-us.md
cmd-embedded.en-us.md
config-cheat-sheet.en-us.md
config-cheat-sheet.zh-cn.md
customizing-gitea.en-us.md
customizing-gitea.zh-cn.md Update documentation to reflect #15219 (#16442) 2021-07-15 20:49:12 +01:00
environment-variables.en-us.md
environment-variables.zh-cn.md Add markdownlint (#20512) 2022-07-28 09:22:47 +08:00
external-renderers.en-us.md
logging-documentation.en-us.md
mail-templates.en-us.md
protected-tags.en-us.md
repo-indexer.en-us.md
repo-mirror.en-us.md
search-engines-indexation.en-us.md
signing.en-us.md