-
-
Notifications
You must be signed in to change notification settings - Fork 609
Description
Describe the feature
PictoPy currently lacks a consistent, robust logging system, particularly in the sync-microservice which uses print statements instead of proper logging. This hinders troubleshooting and monitoring capabilities.
Current Situation Sync-Microservice Logging Issues:
- Uses basic
print()statements instead of a proper logging framework - No log file persistence or rotation
- Missing timestamps and request correlation IDs
- No structured format for error reporting
- Exception handling lacks proper logging context
Example from watcher.py
print(f"File change detected: {change} - {file_path}")
except Exception as e:
print(f"Error in watcher worker: {e}")
Backend Logging Issues:
- Partial implementation with inconsistent usage across modules
- Some modules use proper logging while others use print statements
- No centralized logging configuration
- No log rotation mechanism
Proposed Improvement:
-
Introduce a centralized logging utility for both backend and sync microservice
-
Replace print() statements with proper logging calls, ensuring exceptions include full context (e.g., stack trace, relevant variables, request/file info)
-
Implement log rotation and consistent formatting across all modules
Add ScreenShots
Print statements from the sync microservice do not appear in the backend terminal
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
Checklist before Submitting.
- Have you updated docs for it?.
- Have you added unit tests?.
- Have you made sure unit tests pass?
- Have you made sure code formatting is correct?
- Does it contain any style related issues?