diff --git a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md index cf80e4bf2..3962ffcca 100755 --- a/versioned_docs/version-3.0.0/running-keploy/cli-commands.md +++ b/versioned_docs/version-3.0.0/running-keploy/cli-commands.md @@ -38,6 +38,19 @@ Here are some examples of how to use some common flags: | `sanitize` | `--test-sets, -t`, `-p, --path` | | `config` | `--generate`,`-p, --path` | +### Module-level Debug Filtering + +`--debug` enables debug logs. To filter debug logs by module, set `debugModules` in the config file: + +```yaml +debug: true +debugModules: + include: ["proxy", "record"] + exclude: ["proxy.mysql"] +``` + +See the [Configuration File](configuration-file) doc for details and hierarchical matching behavior. + ## [record](#record) The `record` mode in Keploy allows the user to record Keploy testcases from the API calls. The recorded testcases and generated mocks are then saved in the `keploy` directory in the current working directory. diff --git a/versioned_docs/version-3.0.0/running-keploy/configuration-file.md b/versioned_docs/version-3.0.0/running-keploy/configuration-file.md index 6eb6ee0ce..fdca0f34d 100644 --- a/versioned_docs/version-3.0.0/running-keploy/configuration-file.md +++ b/versioned_docs/version-3.0.0/running-keploy/configuration-file.md @@ -40,6 +40,9 @@ port: 0 proxyPort: 16789 dnsPort: 26789 debug: false +debugModules: + include: [] + exclude: [] disableTele: false inDocker: false generateGithubActions: true @@ -92,6 +95,27 @@ Visit the [CLI Command Docs](http://keploy.io/docs/running-keploy/cli-commands/) ## Configuration Sections +### Debug Logging + +The `debug` and `debugModules` settings control debug log output. + +- **`debug`**: Enables debug logs. When `false`, debug logs are suppressed and `debugModules` is ignored. + +- **`debugModules.include`**: Whitelist of module prefixes. When set, only matching modules emit debug logs. When empty, all modules are allowed (if `debug` is `true`). + +- **`debugModules.exclude`**: Blacklist of module prefixes applied after `include`. + +Module names are logger prefixes (for example: `proxy`, `record`, `test`, `hooks`, `telemetry`, `proxy.http`, `proxy.mysql`). Matching is hierarchical: `proxy` matches `proxy.http` and `proxy.mysql`. + +Example: + +```yaml +debug: true +debugModules: + include: ["proxy", "record"] + exclude: ["proxy.mysql"] +``` + ### Record Section The `record` section in the Keploy-config file allows you to define parameters for recording API calls.