Skip to content

Conversation

vchomakov
Copy link
Contributor

Logging is now controlled via an environment variable MCP_REDIS_LOG_LEVEL

Use MCP_REDIS_LOG_LEVEL to set verbosity
Accepted: DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSET
Aliases: WARNWARNING, FATALCRITICAL
Numeric values allowed (e.g., 10, +20)
Default (unset/unrecognized): WARNING

Handler behavior

  • If handlers already exist (uv/VS Code/pytest), we don’t add any. We only lower too‑strict handler levels so user's chosen level passes; we never raise them.

  • If no handlers exist, we add one stderr StreamHandler with a simple format.

Behavior changes

Default is quiet (WARNING+). Set MCP_REDIS_LOG_LEVEL to INFO/DEBUG to see more.
Host-provided handlers are respected; we don’t add duplicates.

Before (noisy stderr tags)

[warning] [server stderr] ... INFO Starting the Redis MCP Server
[warning] [server stderr] ... INFO Processing request of type
[warning] [server stderr]             ListToolsRequest

After (default: WARNING)

[info] Connection state: Starting
[info] Connection state: Running

Testing

Unit tests added for logging_utils. Full suite passing. Total coverage: 87.67%

@vchomakov vchomakov requested a review from tishun September 29, 2025 15:53
Copy link

jit-ci bot commented Sep 29, 2025

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

Copy link
Contributor

@tishun tishun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vchomakov vchomakov merged commit 8881af8 into main Oct 1, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants