Panic logs a fatal error and exits.
(format string, v ...interface{})
| 31 | |
| 32 | // Panic logs a fatal error and exits. |
| 33 | func (ll *Logger) Panic(format string, v ...interface{}) { |
| 34 | if LevelError > ll.level { |
| 35 | return |
| 36 | } |
| 37 | msg := fmt.Sprintf("[Panic] "+format, v...) |
| 38 | ll.Println(msg) |
| 39 | os.Exit(1) |
| 40 | } |
| 41 | |
| 42 | // Error logs an error. |
| 43 | func (ll *Logger) Error(format string, v ...interface{}) { |