openclaw - 💡(How to fix) Fix qqbot: reduce default log verbosity; avoid logging full chat payloads at info [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68793Fetched 2026-04-19 15:07:24
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

The bundled QQ Bot channel (qqbot) emits very chatty info-level logs during normal operation. Several log lines include full inbound message text and large WebSocket dispatch JSON payloads (for example C2C_MESSAGE_CREATE with content, full d={...}). This makes gateway logs hard to read and risks sensitive user content ending up in log files when file logging is enabled.

Error Message

Thank you for considering this — it would help operators who keep logging.level at info or warn for troubleshooting without drowning in chat content.

Root Cause

The bundled QQ Bot channel (qqbot) emits very chatty info-level logs during normal operation. Several log lines include full inbound message text and large WebSocket dispatch JSON payloads (for example C2C_MESSAGE_CREATE with content, full d={...}). This makes gateway logs hard to read and risks sensitive user content ending up in log files when file logging is enabled.

Fix Action

Fix / Workaround

Summary

The bundled QQ Bot channel (qqbot) emits very chatty info-level logs during normal operation. Several log lines include full inbound message text and large WebSocket dispatch JSON payloads (for example C2C_MESSAGE_CREATE with content, full d={...}). This makes gateway logs hard to read and risks sensitive user content ending up in log files when file logging is enabled.

Example (sanitized)

Typical lines include WebSocket lifecycle noise plus payloads similar to:

  • Dispatch event lines with full JSON d=... including user message content
  • Processing message lines that repeat the full user-visible chat text

Suggestions (non-prescriptive)

  1. Demote high-volume operational logs from log.info to log.debug where appropriate.
  2. For Dispatch / inbound processing, log structured metadata at info and full payloads only when verbose/debug is enabled.
  3. Optionally add a channel-specific verbosity knob if maintainers prefer not to change defaults globally.
RAW_BUFFERClick to expand / collapse

Summary

The bundled QQ Bot channel (qqbot) emits very chatty info-level logs during normal operation. Several log lines include full inbound message text and large WebSocket dispatch JSON payloads (for example C2C_MESSAGE_CREATE with content, full d={...}). This makes gateway logs hard to read and risks sensitive user content ending up in log files when file logging is enabled.

Example (sanitized)

Typical lines include WebSocket lifecycle noise plus payloads similar to:

  • Dispatch event lines with full JSON d=... including user message content
  • Processing message lines that repeat the full user-visible chat text

Expected / desired behavior

  • Routine connection / READY / heartbeat-style noise should be debug (or behind an explicit opt-in verbose flag), not info.
  • Inbound user message bodies should not appear verbatim at info by default (truncate, redact, or log only metadata such as message id / length / channel).

Context

  • Observed while running the official gateway with multiple QQ Bot accounts; other subsystems feel comparatively quiet at the same logging settings.
  • Related code paths live under extensions/qqbot/ (gateway WebSocket handler and reply/delivery paths).

Suggestions (non-prescriptive)

  1. Demote high-volume operational logs from log.info to log.debug where appropriate.
  2. For Dispatch / inbound processing, log structured metadata at info and full payloads only when verbose/debug is enabled.
  3. Optionally add a channel-specific verbosity knob if maintainers prefer not to change defaults globally.

Thank you for considering this — it would help operators who keep logging.level at info or warn for troubleshooting without drowning in chat content.

extent analysis

TL;DR

Demote high-volume operational logs from log.info to log.debug and log structured metadata at info level to reduce log noise and prevent sensitive user content from being logged.

Guidance

  • Review the logging statements in the extensions/qqbot/ code paths, particularly in the gateway WebSocket handler and reply/delivery paths, to identify areas where log levels can be adjusted.
  • Consider adding a channel-specific verbosity knob to allow operators to control log verbosity for the QQ Bot channel without affecting other subsystems.
  • Update log statements to log structured metadata (e.g., message id, length, channel) at the info level, and log full payloads only when verbose/debug logging is enabled.
  • Test the updated logging configuration to ensure that it effectively reduces log noise and protects sensitive user content.

Example

# Before
log.info(f"Received message: {message}")

# After
log.debug(f"Received message: {message}")
log.info(f"Message received (id={message_id}, length={message_length}, channel={channel})")

Notes

The proposed solution assumes that the logging framework used by the application supports log level adjustment and structured logging. Additionally, the exact implementation details may vary depending on the specific logging framework and application architecture.

Recommendation

Apply workaround by demoting high-volume operational logs and logging structured metadata, as this approach allows for a more targeted and flexible solution that can be tailored to the specific needs of the QQ Bot channel and operators.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING