Skip to content

Commit c4b8c2f

Browse files
authored
Merge pull request #1884 from ahoppen/ahoppen/logger-availability
Guard `OSLog` calls on all platforms, not just macOS
2 parents a309360 + c30b165 commit c4b8c2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftSyntaxBuilder/SyntaxParsable+ExpressibleByStringInterpolation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension SyntaxParseable {
2727
/// are on a platform that supports OSLog, otherwise don't do anything.
2828
private func logStringInterpolationParsingError() {
2929
#if canImport(OSLog) && !SWIFTSYNTAX_NO_OSLOG_DEPENDENCY
30-
if #available(macOS 11.0, *) {
30+
if #available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, macCatalyst 14.0, *) {
3131
let diagnostics = ParseDiagnosticsGenerator.diagnostics(for: self)
3232
let formattedDiagnostics = DiagnosticsFormatter().annotatedSource(tree: self, diags: diagnostics)
3333
Logger(subsystem: "SwiftSyntax", category: "ParseError").fault(

0 commit comments

Comments
 (0)