Skip to content

Commit 9ffada3

Browse files
committed
Swift: make internal error telemetry only for the moment
1 parent cce9352 commit 9ffada3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

swift/logging/SwiftDiagnostics.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ struct SwiftDiagnostic {
5454

5555
std::optional<SwiftDiagnosticsLocation> location{};
5656

57+
constexpr SwiftDiagnostic(std::string_view id,
58+
std::string_view name,
59+
std::string_view action = "",
60+
std::string_view helpLinks = "",
61+
Visibility visibility = Visibility::all)
62+
: id{id}, name{name}, action{action}, helpLinks{helpLinks}, visibility{visibility} {}
63+
64+
constexpr SwiftDiagnostic(std::string_view id, std::string_view name, Visibility visibility)
65+
: SwiftDiagnostic(id, name, "", "", visibility) {}
66+
5767
// create a JSON diagnostics for this source with the given timestamp and message to out
5868
// A plaintextMessage is used that includes both the message and the action to take. Dots are
5969
// appended to both. The id is used to construct the source id in the form
@@ -93,6 +103,6 @@ inline constexpr SwiftDiagnostic::Visibility operator&(SwiftDiagnostic::Visibili
93103
constexpr SwiftDiagnostic internalError{
94104
"internal-error",
95105
"Internal error",
96-
"Contact us about this issue",
106+
SwiftDiagnostic::Visibility::telemetry,
97107
};
98108
} // namespace codeql

0 commit comments

Comments
 (0)