(s string)
| 83 | } |
| 84 | |
| 85 | func (l *LogLevel) ParseFromString(s string) bool { |
| 86 | switch strings.ToUpper(s) { |
| 87 | case "ERROR": |
| 88 | *l = LevelError |
| 89 | case "DEBUG": |
| 90 | *l = LevelDebug |
| 91 | case "WARN", "WARNING": |
| 92 | *l = LevelWarn |
| 93 | case "INFO": |
| 94 | *l = LevelInfo |
| 95 | case "NONE": |
| 96 | *l = LevelNone |
| 97 | default: |
| 98 | return false |
| 99 | } |
| 100 | return true |
| 101 | } |
| 102 | |
| 103 | func (l *LogLevel) Set(v LogLevel) { |
| 104 | atomic.StoreInt64((*int64)(l), int64(v)) |
no outgoing calls
no test coverage detected