-
-
Notifications
You must be signed in to change notification settings - Fork 744
Open
Labels
Description
Add Logrus Structured Logging Package Challenge Series
Issue Description
Create a comprehensive Logrus package challenge series to teach developers professional logging practices in Go applications, from basic logging to advanced structured logging patterns used in production systems.
What needs to be implemented
Package Structure
Create packages/logrus/ with the following challenges:
-
Challenge 1: Basic Logging & Levels (Beginner)
- Setting up Logrus logger
- Log levels (Debug, Info, Warn, Error, Fatal, Panic)
- Basic formatting and output
- Build a simple application with proper logging
-
Challenge 2: Structured Logging & Fields (Intermediate)
- Structured logging with fields
- Context-aware logging
- Custom formatters (JSON, Text)
- Request tracing and correlation IDs
-
Challenge 3: Advanced Configuration & Hooks (Intermediate)
- Custom log hooks for external systems
- Log rotation and file management
- Multiple output destinations
- Performance optimization and async logging
-
Challenge 4: Production Logging Patterns (Advanced)
- Centralized logging with ELK stack integration
- Log aggregation and monitoring
- Error tracking and alerting
- Logging best practices for microservices
Required Files for Each Challenge
README.md- Challenge description and requirementssolution-template.go- Starting code template with TODOssolution-template_test.go- Comprehensive test suitelearning.md- Educational content (400+ lines)hints.md- Step-by-step guidancemetadata.json- Challenge metadatago.modandgo.sum- Dependenciesrun_tests.sh- Testing script
Package Metadata (package.json)
{
"name": "logrus",
"display_name": "Logrus Structured Logging",
"description": "Structured, pluggable logging for Go applications",
"version": "v1.9.3",
"github_url": "https://github.com/sirupsen/logrus",
"documentation_url": "https://pkg.go.dev/github.com/sirupsen/logrus",
"stars": 24000,
"category": "logging",
"difficulty": "beginner_to_advanced",
"prerequisites": ["basic_go", "json_concepts", "file_operations"],
"learning_path": [
"challenge-1-basic-logging-levels",
"challenge-2-structured-fields",
"challenge-3-advanced-hooks",
"challenge-4-production-patterns"
],
"tags": ["logging", "structured", "monitoring", "debugging", "observability"],
"estimated_time": "4-6 hours",
"real_world_usage": [
"Application debugging and monitoring",
"Error tracking and alerting",
"Audit trails and compliance",
"Performance monitoring",
"Microservices observability",
"Production troubleshooting"
]
}Learning Objectives
- Master structured logging principles and best practices
- Learn different log levels and when to use them
- Implement context-aware logging with fields
- Build custom formatters and hooks
- Understand production logging architecture
- Practice with real-world monitoring scenarios
Resources
Acceptance Criteria
- All 4 challenges implemented with complete file structure
- Each challenge demonstrates different logging patterns
- Comprehensive tests covering logging scenarios
- Learning materials explain logging best practices
- Code follows existing repository patterns and style
- Examples of integration with monitoring systems
- Documentation covers production deployment considerations
Getting Started
- Study existing package challenges structure
- Review Logrus documentation and examples
- Set up sample applications for logging testing
- Follow the package challenge guidelines from
CONTRIBUTING.md - Start with basic logging and progress to advanced patterns
Need Help?
- Check out our Contributing Guidelines
- Look at existing package implementations for patterns
- Ask questions in the comments below