Skip to content

Commit

Permalink
Added swift version, platform and LICENSE file
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftrien committed Jul 8, 2020
1 parent 7ed829d commit 4311de1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The User manual on [Swiftfire.nl](http://swiftfire.nl/projects/swifterlog/refere

No new features planned. Updates are made on an ad-hoc basis as needed to support Swiftfire development.

#### 2.2.2
#### 2.2.2 & 2.2.3

- Added swift version, platform and a LICENSE file

Expand Down
4 changes: 3 additions & 1 deletion Sources/SwifterLog/Level.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// File: Level.swift
// Project: SwifterLog
//
// Version: 2.2.2
// Version: 2.2.3
//
// Author: Marinus van der Lugt
// Company: http://balancingrock.nl
Expand All @@ -29,6 +29,7 @@
//
// History
//
// 2.2.3 - Added iOS 10 availability test for OSLog
// 2.2.2 - Updated LICENSE
// 2.1.1 - Linux compatibility
// 2.0.1 - Documentation updated
Expand Down Expand Up @@ -137,6 +138,7 @@ public enum Level: Comparable, CustomStringConvertible, VJsonSerializable {
/// The OSLogTYpe for this loglevel.

@available(OSX 10.12, *)
@available(iOS 10, *)
public var osLogType: OSLogType {
switch self {
case .debug: return OSLogType.debug
Expand Down
7 changes: 5 additions & 2 deletions Sources/SwifterLog/Target.OSLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// File: Target.OSLog.swift
// Project: SwifterLog
//
// Version: 2.2.2
// Version: 2.2.3
//
// Author: Marinus van der Lugt
// Company: http://balancingrock.nl
Expand All @@ -29,6 +29,7 @@
//
// History
//
// 2.2.3 - Added iOS 10 availability test for OSLog
// 2.2.2 - Updated LICENSE
// 2.1.1 - Linux compatibility
// 2.0.0 - New header
Expand Down Expand Up @@ -122,7 +123,9 @@ public class OSLog: Target {

#if os(iOS) || os(tvOS)

os_log("%@", type: entry.level.osLogType, (str as NSString))
if #available(iOS 10, *) {
os_log("%@", type: entry.level.osLogType, (str as NSString))
}

#endif

Expand Down

0 comments on commit 4311de1

Please sign in to comment.