Skip to content

Commit

Permalink
Updated syntax to run with Xcode 8 Beta 6 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spriter authored and delba committed Aug 26, 2016
1 parent ad3911f commit 3cd1656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Source/Formatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ public class Formatter: Formatters {
private var components: [Component]

/// The date formatter.
private let dateFormatter = DateFormatter()
fileprivate let dateFormatter = DateFormatter()

/// The formatter logger.
internal weak var logger: Logger!

/// The formatter textual representation.
internal var description: String {
return String(format: format, arguments: components.map { (component: Component) -> CVarArg in
return String(component).uppercased()
return String(describing: component).uppercased()
})
}

Expand Down Expand Up @@ -112,11 +112,11 @@ public class Formatter: Formatters {
case .level:
return format(level: level)
case .message:
return items.map({ String($0) }).joined(separator: separator)
return items.map({ String(describing: $0) }).joined(separator: separator)
case .location:
return format(file: file, line: line)
case .block(let block):
return block().flatMap({ String($0) }) ?? ""
return block().flatMap({ String(describing: $0) }) ?? ""
}
}

Expand Down Expand Up @@ -158,7 +158,7 @@ public class Formatter: Formatters {
case .location:
return format(file: file, line: line)
case .block(let block):
return block().flatMap({ String($0) }) ?? ""
return block().flatMap({ String(describing: $0) }) ?? ""
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public enum Level {
case trace, debug, info, warning, error

var description: String {
return String(self).uppercased()
return String(describing: self).uppercased()
}
}

Expand Down

0 comments on commit 3cd1656

Please sign in to comment.