Skip to content

Fix logging docs for non-Apple platforms #2123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ To adjust the toolchain that should be used by SourceKit-LSP (eg. because you wa

## Logging

SourceKit-LSP has extensive logging to the system log on macOS and to `/var/logs/sourcekit-lsp` or stderr on other platforms.
SourceKit-LSP has extensive logging to the system log on macOS and to `~/.sourcekit-lsp/logs/` or stderr on other platforms.

To show the logs on macOS, run
```sh
Expand All @@ -100,6 +100,10 @@ Or to stream the logs as they are produced:
```
log stream --predicate 'subsystem CONTAINS "org.swift.sourcekit-lsp"' --level debug
```
On non-Apple platforms, you can use common commands like `tail` to read the logs or stream them as they are produced:
```
tail -F ~/.sourcekit-lsp/logs/*
```

SourceKit-LSP masks data that may contain private information such as source file names and contents by default. To enable logging of this information, follow the instructions in [Diagnose Bundle.md](Documentation/Diagnose%20Bundle.md).

Expand Down