From 6aa86d32ffb9dee3d75b46a3dd87182bd062b2a8 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Tue, 4 Aug 2020 11:13:11 +0200
Subject: [PATCH] docs: LOG_LEVEL and LOG_FORMAT

Closes #6861
---
 docs/development/self-hosting.md        | 4 ++++
 docs/usage/self-hosted-configuration.md | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/docs/development/self-hosting.md b/docs/development/self-hosting.md
index 460ed10ccb..bfbc9febea 100644
--- a/docs/development/self-hosting.md
+++ b/docs/development/self-hosting.md
@@ -348,3 +348,7 @@ spec:
                       name: renovate-env
           restartPolicy: Never
 ```
+
+## Logging
+
+It's recommended to configure `LOG_LEVEL=debug` and `LOG_FORMAT=json` in environment if you are ingesting/parsing logs into another system. Debug logging is usually necessary for any debugging, while JSON format will mean that the output is parseable.
diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md
index 2faa4576cd..3a1f3ba379 100644
--- a/docs/usage/self-hosted-configuration.md
+++ b/docs/usage/self-hosted-configuration.md
@@ -98,6 +98,10 @@ The `git` commands are run locally in the cloned repo instead of globally to red
 
 ## logLevel
 
+It's recommended to run at debug level if you can, and configure it using the environment variable `LOG_LEVEL=debug`. By configuring using the environment it means that debug logging starts from the beginning of the app, while if you configure it using file config then the debug logging can only start after the file config is parsed.
+
+Additionally, if you configure `LOG_FORMAT=json` in env then logging will be done in JSON format instead of "pretty" format, which is usually better if you're doing any ingestion or parsing of the logs.
+
 ## onboarding
 
 Set this to `false` if (a) you configure Renovate entirely on the bot side (i.e. empty `renovate.json` in repositories) and (b) you wish to run Renovate on every repository the bot has access to, and (c) you wish to skip the onboarding PRs.
-- 
GitLab