summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-openapi/runtime/logger/standard.go
blob: f7e67ebb9e758ad77014deb8042edfe443496eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package logger

import (
	"fmt"
	"os"
)

type StandardLogger struct{}

func (StandardLogger) Printf(format string, args ...interface{}) {
	if len(format) == 0 || format[len(format)-1] != '\n' {
		format += "\n"
	}
	fmt.Fprintf(os.Stderr, format, args...)
}

func (StandardLogger) Debugf(format string, args ...interface{}) {
	if len(format) == 0 || format[len(format)-1] != '\n' {
		format += "\n"
	}
	fmt.Fprintf(os.Stderr, format, args...)
}