@@ -35,7 +35,7 @@ public final class OSLog {
3535 /// Creates a custom log object.
3636 public convenience init ( subsystem: String , category: String ) {
3737 #if canImport(os)
38- if #available( macOS 10 . 12 , * ) {
38+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
3939 self . init ( os. OSLog ( subsystem: subsystem, category: category) )
4040 } else {
4141 self . init ( )
@@ -48,7 +48,7 @@ public final class OSLog {
4848 /// The shared default log.
4949 public static let disabled : OSLog = {
5050 #if canImport(os)
51- if #available( macOS 10 . 12 , * ) {
51+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
5252 return OSLog ( os. OSLog. disabled)
5353 } else {
5454 return OSLog ( )
@@ -61,7 +61,7 @@ public final class OSLog {
6161 /// The shared default log.
6262 public static let `default` : OSLog = {
6363 #if canImport(os)
64- if #available( macOS 10 . 12 , * ) {
64+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
6565 return OSLog ( os. OSLog. default)
6666 } else {
6767 return OSLog ( )
@@ -91,7 +91,7 @@ public struct OSLogType {
9191 /// The default log level.
9292 public static var `default` : OSLogType {
9393 #if canImport(os)
94- if #available( OSX 10 . 14 , * ) {
94+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
9595 return self . init ( os. OSLogType. default)
9696 } else {
9797 return self . init ( )
@@ -104,7 +104,7 @@ public struct OSLogType {
104104 /// The info log level.
105105 public static var info : OSLogType {
106106 #if canImport(os)
107- if #available( OSX 10 . 14 , * ) {
107+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
108108 return self . init ( os. OSLogType. info)
109109 } else {
110110 return self . init ( )
@@ -117,7 +117,7 @@ public struct OSLogType {
117117 /// The debug log level.
118118 public static var debug : OSLogType {
119119 #if canImport(os)
120- if #available( OSX 10 . 14 , * ) {
120+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
121121 return self . init ( os. OSLogType. info)
122122 } else {
123123 return self . init ( )
@@ -139,7 +139,7 @@ public struct OSLogType {
139139 _ args: CVarArg ...
140140) {
141141 #if canImport(os)
142- if #available( OSX 10 . 14 , * ) {
142+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
143143 switch args. count {
144144 case 0 :
145145 os. os_log ( type. type, log: log. log, message)
@@ -181,7 +181,7 @@ public struct OSSignpostType {
181181 /// Begins a signposted interval.
182182 public static let begin : OSSignpostType = {
183183 #if canImport(os)
184- if #available( macOS 10 . 14 , * ) {
184+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
185185 return OSSignpostType ( . begin)
186186 } else {
187187 fatalError ( " unreachable " )
@@ -194,7 +194,7 @@ public struct OSSignpostType {
194194 /// Ends a signposted interval.
195195 public static let end : OSSignpostType = {
196196 #if canImport(os)
197- if #available( macOS 10 . 14 , * ) {
197+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
198198 return OSSignpostType ( . end)
199199 } else {
200200 fatalError ( " unreachable " )
@@ -207,7 +207,7 @@ public struct OSSignpostType {
207207 /// Marks a point of interest in time with no duration.
208208 public static let event : OSSignpostType = {
209209 #if canImport(os)
210- if #available( macOS 10 . 14 , * ) {
210+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
211211 return OSSignpostType ( . event)
212212 } else {
213213 fatalError ( " unreachable " )
@@ -227,7 +227,7 @@ public struct OSSignpostID {
227227 private let storage : Any ?
228228
229229 #if canImport(os)
230- @available ( macOS 10 . 14 , * )
230+ @available ( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * )
231231 @usableFromInline var id : os . OSSignpostID {
232232 return storage as! os . OSSignpostID
233233 }
@@ -241,7 +241,7 @@ public struct OSSignpostID {
241241 // provided log handle.
242242 public init ( log: OSLog ) {
243243 #if canImport(os)
244- if #available( macOS 10 . 14 , * ) {
244+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
245245 self . init ( os. OSSignpostID ( log: log. log) )
246246 } else {
247247 self . init ( nil )
@@ -255,7 +255,7 @@ public struct OSSignpostID {
255255 /// concurrently.
256256 public static let exclusive : OSSignpostID = {
257257 #if canImport(os)
258- if #available( macOS 10 . 14 , * ) {
258+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
259259 return OSSignpostID ( os. OSSignpostID. exclusive)
260260 } else {
261261 return OSSignpostID ( nil )
@@ -274,7 +274,7 @@ public struct OSSignpostID {
274274 signpostID: OSSignpostID = . exclusive
275275) {
276276 #if canImport(os)
277- if #available( macOS 10 . 14 , * ) {
277+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
278278 os. os_signpost ( type. type, log: log. log, name: name, signpostID: signpostID. id)
279279 }
280280 #endif
@@ -290,7 +290,7 @@ public struct OSSignpostID {
290290 _ args: CVarArg ...
291291) {
292292 #if canImport(os)
293- if #available( macOS 10 . 14 , * ) {
293+ if #available( macOS 10 . 14 , iOS 12 , tvOS 12 , watchOS 5 , * ) {
294294 switch args. count {
295295 case 0 :
296296 os. os_signpost ( type. type, log: log. log, name: name, signpostID: signpostID. id, format)
0 commit comments