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

import "os"

type Logger interface {
	Printf(format string, args ...interface{})
	Debugf(format string, args ...interface{})
}

func DebugEnabled() bool {
	d := os.Getenv("SWAGGER_DEBUG")
	if d != "" && d != "false" && d != "0" {
		return true
	}
	d = os.Getenv("DEBUG")
	if d != "" && d != "false" && d != "0" {
		return true
	}
	return false
}