Serge Bazanski | cc25bdf | 2018-10-25 14:02:58 +0200 | [diff] [blame] | 1 | package logger |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "os" |
| 6 | ) |
| 7 | |
| 8 | type StandardLogger struct{} |
| 9 | |
| 10 | func (StandardLogger) Printf(format string, args ...interface{}) { |
| 11 | if len(format) == 0 || format[len(format)-1] != '\n' { |
| 12 | format += "\n" |
| 13 | } |
| 14 | fmt.Fprintf(os.Stderr, format, args...) |
| 15 | } |
| 16 | |
| 17 | func (StandardLogger) Debugf(format string, args ...interface{}) { |
| 18 | if len(format) == 0 || format[len(format)-1] != '\n' { |
| 19 | format += "\n" |
| 20 | } |
| 21 | fmt.Fprintf(os.Stderr, format, args...) |
| 22 | } |