summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-openapi/runtime/logger/standard.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-openapi/runtime/logger/standard.go')
-rw-r--r--vendor/github.com/go-openapi/runtime/logger/standard.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/go-openapi/runtime/logger/standard.go b/vendor/github.com/go-openapi/runtime/logger/standard.go
new file mode 100644
index 000000000..f7e67ebb9
--- /dev/null
+++ b/vendor/github.com/go-openapi/runtime/logger/standard.go
@@ -0,0 +1,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...)
+}