Logging All Message Content #6

Open
opened 2026-02-02 15:10:22 -05:00 by jared · 0 comments
Owner

logger.info(f"Channel: [{str(message.channel)}] User: {str(message.author)} Content: {message.content}")

Issue: Privacy violation, logs sensitive data, creates massive log files.

Fix:

Only log commands or errors, not all message content

if message.content.startswith(('.', '/')):
logger.info(f"Command in {message.channel}: {message.author} - {message.content[:50]}")

logger.info(f"Channel: [{str(message.channel)}] User: {str(message.author)} Content: {message.content}") Issue: Privacy violation, logs sensitive data, creates massive log files. Fix: # Only log commands or errors, not all message content if message.content.startswith(('.', '/')): logger.info(f"Command in {message.channel}: {message.author} - {message.content[:50]}")
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/discordBot#6