summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-09-04 17:29:41 +0300
committerPaul Buetow <pbuetow@mimecast.com>2020-09-04 17:29:41 +0300
commit3a7b359055f4277d3a07b3b7bf8580ef575c54a8 (patch)
tree42cd974d97c480a73456636eb651704368a86f9e
parentedee62717fbe752556d702c029a5b39de1b04677 (diff)
remove of Quiet mode, this will be obsolete
-rw-r--r--cmd/dcat/main.go4
-rw-r--r--cmd/dgrep/main.go4
-rw-r--r--cmd/dmap/main.go4
-rw-r--r--cmd/drun/main.go4
-rw-r--r--cmd/dtail/main.go4
-rw-r--r--internal/io/logger/logger.go2
-rw-r--r--internal/io/logger/modes.go1
7 files changed, 6 insertions, 17 deletions
diff --git a/cmd/dcat/main.go b/cmd/dcat/main.go
index 7690b69..e0931d8 100644
--- a/cmd/dcat/main.go
+++ b/cmd/dcat/main.go
@@ -20,7 +20,6 @@ func main() {
var debugEnable bool
var displayVersion bool
var noColor bool
- var quietEnable bool
var sshPort int
userName := user.Name()
@@ -29,7 +28,6 @@ func main() {
flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages")
flag.BoolVar(&displayVersion, "version", false, "Display version")
flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors")
- flag.BoolVar(&quietEnable, "quiet", false, "Reduce output")
flag.IntVar(&args.ConnectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&sshPort, "port", 2222, "SSH server port")
flag.StringVar(&args.Discovery, "discovery", "", "Server discovery method")
@@ -49,7 +47,7 @@ func main() {
}
ctx := context.TODO()
- logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable})
+ logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable})
client, err := clients.NewCatClient(args)
if err != nil {
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go
index d432135..e58ea8f 100644
--- a/cmd/dgrep/main.go
+++ b/cmd/dgrep/main.go
@@ -21,7 +21,6 @@ func main() {
var displayVersion bool
var grep string
var noColor bool
- var quietEnable bool
var sshPort int
userName := user.Name()
@@ -31,7 +30,6 @@ func main() {
flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages")
flag.BoolVar(&displayVersion, "version", false, "Display version")
flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors")
- flag.BoolVar(&quietEnable, "quiet", false, "Reduce output")
flag.IntVar(&args.ConnectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&sshPort, "port", 2222, "SSH server port")
flag.StringVar(&args.Discovery, "discovery", "", "Server discovery method")
@@ -53,7 +51,7 @@ func main() {
}
ctx := context.TODO()
- logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable})
+ logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable})
if grep != "" {
args.RegexStr = grep
diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go
index 4f6611c..470ce76 100644
--- a/cmd/dmap/main.go
+++ b/cmd/dmap/main.go
@@ -21,7 +21,6 @@ func main() {
var displayVersion bool
var noColor bool
var queryStr string
- var quietEnable bool
var sshPort int
args := clients.Args{
@@ -34,7 +33,6 @@ func main() {
flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages")
flag.BoolVar(&displayVersion, "version", false, "Display version")
flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors")
- flag.BoolVar(&quietEnable, "quiet", false, "Reduce output")
flag.IntVar(&args.ConnectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&args.Timeout, "timeout", 0, "Max time dtail server will collect data until disconnection")
flag.IntVar(&sshPort, "port", 2222, "SSH server port")
@@ -56,7 +54,7 @@ func main() {
}
ctx := context.TODO()
- logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable})
+ logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable})
client, err := clients.NewMaprClient(args, queryStr, clients.DefaultMode)
if err != nil {
diff --git a/cmd/drun/main.go b/cmd/drun/main.go
index d18b050..c948c0f 100644
--- a/cmd/drun/main.go
+++ b/cmd/drun/main.go
@@ -25,7 +25,6 @@ func main() {
var displayVersion bool
var jobName string
var noColor bool
- var quietEnable bool
var sshPort int
userName := user.Name()
@@ -34,7 +33,6 @@ func main() {
flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages")
flag.BoolVar(&displayVersion, "version", false, "Display version")
flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors")
- flag.BoolVar(&quietEnable, "quiet", false, "Reduce output")
flag.IntVar(&args.ConnectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&args.Timeout, "timeout", 0, "Command execution timeout")
flag.IntVar(&sshPort, "port", 2222, "SSH server port")
@@ -57,7 +55,7 @@ func main() {
}
ctx := context.TODO()
- logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable})
+ logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable})
args.What, args.Arguments = readCommand(command)
client, err := clients.NewRunClient(args, background, jobName)
diff --git a/cmd/dtail/main.go b/cmd/dtail/main.go
index 1d15426..3d0e0f6 100644
--- a/cmd/dtail/main.go
+++ b/cmd/dtail/main.go
@@ -30,7 +30,6 @@ func main() {
var noColor bool
var pprof int
var queryStr string
- var quietEnable bool
var shutdownAfter int
var sshPort int
@@ -42,7 +41,6 @@ func main() {
flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages")
flag.BoolVar(&displayVersion, "version", false, "Display version")
flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors")
- flag.BoolVar(&quietEnable, "quiet", false, "Reduce output")
flag.IntVar(&args.ConnectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&args.Timeout, "timeout", 0, "Max time dtail server will collect data until disconnection")
flag.IntVar(&pprof, "pprof", -1, "Start PProf server this port")
@@ -84,7 +82,7 @@ func main() {
os.Exit(healthClient.Start(ctx))
}
- logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable, Quiet: quietEnable})
+ logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable})
if pprof > -1 {
// For debugging purposes only
diff --git a/internal/io/logger/logger.go b/internal/io/logger/logger.go
index 6ba9f9a..8bfb94f 100644
--- a/internal/io/logger/logger.go
+++ b/internal/io/logger/logger.go
@@ -223,7 +223,7 @@ func log(what string, severity string, args []interface{}) string {
if Mode.Nothing {
return ""
}
- if Mode.Quiet && severity != errorStr && severity != fatalStr {
+ if severity != errorStr && severity != fatalStr {
return ""
}
diff --git a/internal/io/logger/modes.go b/internal/io/logger/modes.go
index 0ec3f68..47dadfe 100644
--- a/internal/io/logger/modes.go
+++ b/internal/io/logger/modes.go
@@ -5,7 +5,6 @@ type Modes struct {
Server bool
Trace bool
Debug bool
- Quiet bool
Nothing bool
logToStdout bool
logToFile bool