mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
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:
committed by
Harshavardhana
parent
ca3022d545
commit
8ea571c7f7
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user