diff options
Diffstat (limited to 'vendor/github.com/go-openapi/runtime/logger/logger.go')
-rw-r--r-- | vendor/github.com/go-openapi/runtime/logger/logger.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/go-openapi/runtime/logger/logger.go b/vendor/github.com/go-openapi/runtime/logger/logger.go index d62c1f708f..6f4debcc14 100644 --- a/vendor/github.com/go-openapi/runtime/logger/logger.go +++ b/vendor/github.com/go-openapi/runtime/logger/logger.go @@ -8,5 +8,13 @@ type Logger interface { } func DebugEnabled() bool { - return os.Getenv("SWAGGER_DEBUG") != "" || os.Getenv("DEBUG") != "" + 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 } |