| name | logging-patterns |
| description | Use when adding logging to features - structured logging with LoggerService categories |
Logging Patterns
Use this skill when implementing features that need logging or debugging.
Checklist
Setup Logger
Select Appropriate Category
Choose the category that matches your feature domain:
Use Appropriate Log Level
Example Usage
from app.services import logger_service
logger = logger_service.get_logger(__name__, category='ModelLoad')
def load_model(model_path: str):
logger.info(f'Loading model from {model_path}')
try:
logger.debug('Model loaded successfully')
except FileNotFoundError as error:
logger.error(f'Model file not found: {error}')
raise
Configuration
Reference
See app/services/logger.py for LoggerService implementation.