File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import Foundation
1414/// - debug: a message only relevant while debugging
1515/// - enter: a notice of enter a function
1616/// - exit: a notice of exiting a function
17- public enum LogLevel : Int , CustomStringConvertible {
17+ public enum LogLevel : Int , Comparable , CustomStringConvertible {
1818 case error = 1
1919 case warn
2020 case info
@@ -24,13 +24,15 @@ public enum LogLevel: Int, CustomStringConvertible {
2424
2525 public var description : String {
2626 switch self {
27- case . error: return " ERROR "
28- case . warn: return " WARN "
29- case . info: return " INFO "
30- case . debug: return " DEBUG "
31- case . enter: return " ENTER "
32- case . exit: return " EXIT "
27+ case . error: return " ❤️ ERROR"
28+ case . warn: return " 💛 WARN"
29+ case . info: return " 💜 INFO"
30+ case . debug: return " 🖤 DEBUG"
31+ case . enter: return " 💙 ENTER"
32+ case . exit: return " 💙 EXIT"
3333 }
3434 }
35-
35+ public static func < ( lhs: LogLevel , rhs: LogLevel ) -> Bool {
36+ return lhs. rawValue < rhs. rawValue
37+ }
3638}
You can’t perform that action at this time.
0 commit comments