logging-patterns
Use when adding logging to features - structured logging with LoggerService categories
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when adding logging to features - structured logging with LoggerService categories
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | logging-patterns |
| description | Use when adding logging to features - structured logging with LoggerService categories |
Use this skill when implementing features that need logging or debugging.
from app.services import logger_servicelogger = logger_service.get_logger(__name__, category='[Category]')Choose the category that matches your feature domain:
[ModelLoad] - Model loading operations[Download] - Download operations[Generate] - Image generation[API] - API endpoints[Database] - Database operations[Service] - Service layer operations[Socket] - WebSocket events[GPU] - GPU operations.debug() - Detailed diagnostic information (only visible with LOG_LEVEL=DEBUG).info() - General informational messages (progress, status updates).warning() - Warning messages (degraded functionality, deprecated usage).error() - Error messages (failures that don't stop execution).exception() - Exceptions with full stack traces (use in except blocks)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:
# ... model loading logic
logger.debug('Model loaded successfully')
except FileNotFoundError as error:
logger.error(f'Model file not found: {error}')
raise
LOG_LEVEL=DEBUG uv run python main.pySee app/services/logger.py for LoggerService implementation.
Master code organization - encapsulation with wrapper methods, file modularity (split >150 lines), one function one responsibility, descriptive naming, minimal comments
Use when starting work - guidelines for asking questions and commit policies
Use when adding error handling - exception patterns, HTTP codes, domain exceptions
Use when exiting plan mode - where to save implementation plans
Apply Martin Fowler's refactoring patterns - extract variables to eliminate repetition, split temporary variables, replace temp with query for cleaner, more maintainable code
Use when writing tests - test structure, mocking patterns, pre-commit checks