Remove MINIO_DEBUG environment variable (#2794)

Removes the unimplemented settings of MINIO_DEBUG=mem and makes
MINIO_DEBUG=lock the default behaviour.
This commit is contained in:
Aditya Manthramurthy
2016-09-27 14:35:43 -07:00
committed by Harshavardhana
parent ca3022d545
commit 8ea571c7f7
8 changed files with 62 additions and 103 deletions

View File

@@ -21,7 +21,6 @@ import (
"github.com/fatih/color"
"github.com/minio/minio/pkg/objcache"
"os"
)
// Global constants for Minio.
@@ -44,9 +43,6 @@ var (
globalQuiet = false // Quiet flag set via command line
globalTrace = false // Trace flag set via environment setting.
globalDebug = false // Debug flag set to print debug info.
globalDebugLock = false // Lock debug info set via environment variable MINIO_DEBUG=lock .
globalDebugMemory = false // Memory debug info set via environment variable MINIO_DEBUG=mem
// Add new global flags here.
// Maximum connections handled per
@@ -75,15 +71,3 @@ var (
colorBlue = color.New(color.FgBlue).SprintfFunc()
colorBold = color.New(color.Bold).SprintFunc()
)
// fetch from environment variables and set the global values related to locks.
func setGlobalsDebugFromEnv() {
debugEnv := os.Getenv("MINIO_DEBUG")
switch debugEnv {
case "lock":
globalDebugLock = true
case "mem":
globalDebugMemory = true
}
globalDebug = globalDebugLock || globalDebugMemory
}