Skip to content

Commit

Permalink
Merge pull request #10 from IBM-Swift/issue_523
Browse files Browse the repository at this point in the history
Updates to low level APIs to make the code more Swifty
  • Loading branch information
Robert F. Dickerson authored Jul 24, 2016
2 parents 9b30704 + 66d1614 commit ccb473a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.build
LoggerAPI.xcodeproj
28 changes: 15 additions & 13 deletions Sources/LoggerAPI/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,27 @@
* limitations under the License.
**/

public enum LoggerMessageType: String {
case verbose = "VERBOSE"
case info = "INFO"
case debug = "DEBUG"
case warning = "WARNING"
case error = "ERROR"

public func logValue() -> Int {
public enum LoggerMessageType: Int {
case debug = 1
case verbose = 2
case info = 3
case warning = 4
case error = 5
}

extension LoggerMessageType: CustomStringConvertible {
public var description: String {
switch self {
case .verbose:
return 1
return "VERBOSE"
case .info:
return 2
return "INFO"
case .debug:
return 3
return "DEBUG"
case .warning:
return 4
return "WARNING"
case .error:
return 5
return "ERROR"
}
}
}
Expand Down

0 comments on commit ccb473a

Please sign in to comment.