From 2d903453d5628a55af41533445636f1a00d7e4cd Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 3 Oct 2020 10:01:40 -0600 Subject: [PATCH] updated Debug mode documenation. --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 770eacb..95ed9da 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,47 @@ You can test that your notifications are configured correctly by posting an empt curl -X POST http://localhost:8080/api/health/notify ``` +# Debug mode & Log Files +Scrutiny provides various methods to change the log level to debug and generate log files. + +## Web Server/API + +You can use environmental variables to enable debug logging and/or log files for the web server: + +``` +DEBUG=true +SCRUTINY_LOG_FILE=/tmp/web.log +``` + +You can configure the log level and log file in the config file: + +``` +log: + file: '/tmp/web.log' + level: DEBUG +``` + +Or if you're not using docker, you can pass CLI arguments to the web server during startup: + +``` +scrutiny start --debug --log-file /tmp/web.log +``` + +## Collector + +You can use environmental variables to enable debug logging and/or log files for the collector: + +``` +DEBUG=true +COLLECTOR_LOG_FILE=/tmp/collector.log +``` + +Or if you're not using docker, you can pass CLI arguments to the collector during startup: + +``` +scrutiny-collector-metrics run --debug --log-file /tmp/collector.log +``` + # Contributing Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for instructions for how to develop and contribute to the scrutiny codebase.