From 6f34bf3ba7c84f7e82ed017739a85ff7c8ee19fb Mon Sep 17 00:00:00 2001 From: Sujata Roy Date: Tue, 9 Jul 2024 16:43:02 -0700 Subject: [PATCH 1/3] Nomad Default to 5m duration and trace-level logging --- command/operator_debug.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/operator_debug.go b/command/operator_debug.go index 7c6fe1b32c6..e4ef4af0520 100644 --- a/command/operator_debug.go +++ b/command/operator_debug.go @@ -157,7 +157,7 @@ Debug Options: -duration= Set the duration of the debug capture. Logs will be captured from specified servers and - nodes at "log-level". Defaults to 2m. + nodes at "log-level". Defaults to 5m. -event-index= Specifies the index to start streaming events from. If the requested index is @@ -177,7 +177,7 @@ Debug Options: duration to capture a single snapshot. Defaults to 30s. -log-level= - The log level to monitor. Defaults to DEBUG. + The log level to monitor. Defaults to TRACE. -log-include-location Include file and line information in each log line monitored. The default @@ -359,11 +359,11 @@ func (c *OperatorDebugCommand) Run(args []string) int { var nodeIDs, serverIDs string var allowStale bool - flags.StringVar(&duration, "duration", "2m", "") + flags.StringVar(&duration, "duration", "5m", "") flags.Int64Var(&eventIndex, "event-index", 0, "") flags.StringVar(&eventTopic, "event-topic", "none", "") flags.StringVar(&interval, "interval", "30s", "") - flags.StringVar(&c.logLevel, "log-level", "DEBUG", "") + flags.StringVar(&c.logLevel, "log-level", "TRACE", "") flags.BoolVar(&c.logIncludeLocation, "log-include-location", true, "") flags.IntVar(&c.maxNodes, "max-nodes", 10, "") flags.StringVar(&c.nodeClass, "node-class", "", "") From 8b0a88e2f7aa7b4f3a67156e1413a7b145db6b90 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 22 Aug 2024 09:17:03 -0700 Subject: [PATCH 2/3] docs: update defaults for operator debug --- website/content/docs/commands/operator/debug.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/commands/operator/debug.mdx b/website/content/docs/commands/operator/debug.mdx index 8ffde93526f..aa5b18224d5 100644 --- a/website/content/docs/commands/operator/debug.mdx +++ b/website/content/docs/commands/operator/debug.mdx @@ -47,13 +47,13 @@ true. ## Debug Options -- `-duration=2m`: Set the duration of the debug capture. Logs will be captured from - specified servers and nodes at `log-level`. Defaults to `2m`. +- `-duration=5m`: Set the duration of the debug capture. Logs will be captured from + specified servers and nodes at `log-level`. Defaults to `5m`. - `-interval=30s`: The interval between snapshots of the Nomad state. If unspecified, only one snapshot is captured. Defaults to `30s`. -- `-log-level=DEBUG`: The log level to monitor. Defaults to `DEBUG`. +- `-log-level=TRACE`: The log level to monitor. Defaults to `TRACE`. - `-log-include-location`: Include file and line information in each log line monitored. The default is `true`. From 3572fd58cfadb734c89b5506697bd4a4e3a3a94c Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 22 Aug 2024 09:19:05 -0700 Subject: [PATCH 3/3] docs: add cl for #23850 --- .changelog/23850.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/23850.txt diff --git a/.changelog/23850.txt b/.changelog/23850.txt new file mode 100644 index 00000000000..73ae31e0a6f --- /dev/null +++ b/.changelog/23850.txt @@ -0,0 +1,3 @@ +```release-note:improvement +cli: Increase default log level and duration when capturing logs with `operator debug` +```