Skip to content

Commit 7882228

Browse files
authored
Merge pull request #2024 from ahoppen/extended-logging-doc
Move documentation on how to enable extended logging to its own document
2 parents 0a54c25 + 6a5195b commit 7882228

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

Contributor Documentation/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ The following documentation documents are primarily intended for developers of S
55
- [Background Indexing](Background%20Indexing.md)
66
- [BSP Extension](BSP%20Extensions.md)
77
- [Debugging Memory Leaks](Debugging%20Memory%20Leaks.md)
8+
- [Environment Variables](Environment%20Variables.md)
89
- [Files To Reindex](Files%20To%20Reindex.md)
910
- [Implementing a BSP server](Implementing%20a%20BSP%20server.md)
10-
- [LSP Extensions](LSP%20Extensions.md)
1111
- [Logging](Logging.md)
12+
- [LSP Extensions](LSP%20Extensions.md)
1213
- [Modules](Modules.md)
1314
- [Overview](Overview.md)
1415
- [Swift Version](Swift%20Version.md)

Documentation/Diagnose Bundle.md

-22
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,3 @@ You may want to inspect the bundle to determine whether you're willing to share
1717
- Versions of Swift installed on your system
1818
- If possible, a minimized project that caused SourceKit to crash
1919
- If possible, a minimized project that caused the Swift compiler to crash
20-
21-
## Enable Extended logging
22-
23-
Extended logging of SourceKit-LSP is not enabled by default because it contains information about your source code, directory structure, and similar potentially sensitive information. Instead, the logging system redacts that information. If you are comfortable with sharing such information, you can enable extended SourceKit-LSP’s extended logging, which improves the ability of SourceKit-LSP developers to understand and fix issues.
24-
25-
### macOS
26-
27-
To enable extended logging on macOS, install the configuration profile from https://github.com/swiftlang/sourcekit-lsp/blob/main/Documentation/Enable%20Extended%20Logging.mobileconfig as described in https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac#mchlp41bd550. SourceKit-LSP will immediately stop redacting information and include them in the system log.
28-
29-
To disable extended logging again, remove the configuration profile as described in https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac#mchlpa04df41.
30-
31-
### Non-Apple platforms
32-
33-
To enable extended logging on non-Apple platforms, create a [configuration file](Configuration%20File.md) with the following contents at `~/.sourcekit-lsp/config.json` with the following contents:
34-
```json
35-
{
36-
"logging": {
37-
"level": "debug",
38-
"privacyLevel": "private"
39-
}
40-
}
41-
```
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Enable Extended logging
2+
3+
By default, SourceKit-LSP redacts information about your source code, directory structure, and similar potentially sensitive information from its logs. If you are comfortable with sharing such information, you can enable extended SourceKit-LSP’s extended logging, which improves the ability of SourceKit-LSP developers to understand and fix issues.
4+
5+
When extended logging is enabled, it will log extended information from that point onwards. To capture the extended logs for an issue you are seeing, please reproduce the issue after enabling extended logging and capture a diagnose bundle by running `sourcekit-lsp diagnose` in terminal.
6+
7+
## macOS
8+
9+
To enable extended logging on macOS, install the configuration profile from https://github.com/swiftlang/sourcekit-lsp/blob/main/Documentation/Enable%20Extended%20Logging.mobileconfig as described in https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac#mchlp41bd550. SourceKit-LSP will immediately stop redacting information and include them in the system log.
10+
11+
To disable extended logging again, remove the configuration profile as described in https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac#mchlpa04df41.
12+
13+
## Non-Apple platforms
14+
15+
To enable extended logging on non-Apple platforms, create a [configuration file](Configuration%20File.md) with the following contents at `~/.sourcekit-lsp/config.json` with the following contents:
16+
```json
17+
{
18+
"logging": {
19+
"level": "debug",
20+
"privacyLevel": "private"
21+
}
22+
}
23+
```

Documentation/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ The following documentation documents are intended for users of SourceKit-LSP.
66
- [Diagnose Bundle](Diagnose%20Bundle.md)
77
- [Editor Integration](Editor%20Integration.md)
88
- [Enable Experimental Background Indexing](Enable%20Experimental%20Background%20Indexing.md)
9-
- [Environment Variables](Environment%20Variables.md)
9+
- [Enable Extended Logging](Enable%20Extended%20Logging.md)
1010
- [Using SourceKit-LSP with Embedded Projects](Using%20SourceKit-LSP%20with%20Embedded%20Projects.md)

0 commit comments

Comments
 (0)