Fix Critical Security Issue: Replace print() with proper logging

Replaced all debug print() statements with proper logging framework:
- tasks/views.py: 5 print statements → logger.debug()
- sync/views.py: 15 print statements → logger.debug()
- config/celery.py: 1 print statement → logger.debug()
- notifications/tasks.py: 2 print statements → logger.error()

Retained print() in settings files (development.py, selfhosted.py) as they are appropriate warnings to stderr for configuration issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2025-12-22 22:34:57 -07:00
co-authored by Claude Sonnet 4.5
parent a22c3eed50
commit b57321e1e4
4 changed files with 34 additions and 22 deletions
+4 -1
View File
@@ -2,10 +2,13 @@
Celery configuration for KeepItGoing.
"""
import logging
import os
from celery import Celery
from celery.schedules import crontab
logger = logging.getLogger(__name__)
# Set the default Django settings module
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
@@ -32,4 +35,4 @@ app.conf.beat_schedule = {
@app.task(bind=True)
def debug_task(self):
print(f'Request: {self.request!r}')
logger.debug(f'Request: {self.request!r}')