From 98e4159f6bb9a5886b32d1d467a98a58f8b54b83 Mon Sep 17 00:00:00 2001
From: Wesley Pettit <wppttt@amazon.com>
Date: Thu, 24 Aug 2023 14:23:48 -0700
Subject: [PATCH] debugging: add detailed examples for enabling debug logging

Signed-off-by: Wesley Pettit <wppttt@amazon.com>
---
 troubleshooting/debugging.md | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/troubleshooting/debugging.md b/troubleshooting/debugging.md
index 4f65a103d..ff9d67b95 100644
--- a/troubleshooting/debugging.md
+++ b/troubleshooting/debugging.md
@@ -537,7 +537,36 @@ When you experience a problem, before you cut us an issue, try the following.
 
 Many Fluent Bit problems can be easily understood once you have full log output. Also, if you want help from the aws-for-fluent-bit team, we generally request/require debug log output.
 
-The log level for Fluent Bit can be set in the [Service section](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit), or by setting the env var `FLB_LOG_LEVEL=debug`.
+The log level for Fluent Bit can be set in the [Service section](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit), or by setting the environment variable `FLB_LOG_LEVEL=debug`.
+
+For example, in the service section:
+```
+[SERVICE]
+    Log_Level debug
+```
+
+Remember, you can only have a single `[SERVICE]` configured across all of your configuration files for Fluent Bit.
+
+Alternatively, set the log level via an environment variable. In your ECS task definition:
+```
+"environment": [
+	{
+		"name": "FLB_LOG_LEVEL",
+		"value": "debug"
+	}
+],
+```
+
+In your kubernetes YAML:
+
+```
+    spec:
+      containers:
+      - name: fluent-bit
+        env:
+            - name: FLB_LOG_LEVEL
+              value: debug
+```
 
 #### Enabling Monitoring for Fluent Bit