
Logging Patterns
This one nails the practice of making logs machine-readable for AI debugging, which matters more now that Claude is analyzing your stack traces. It pushes JSON structured logging with SLF4J and MDC for request tracing, giving you Spring Boot 3.4+ native configs and Logstash encoder setups for older versions. The AI-friendly format section is the real hook: it shows why JSON logs let Claude parse fields directly instead of burning tokens interpreting text patterns. You get working filter code for request IDs, profile switching between JSON and human-readable formats, and jq queries for log analysis. Opinionated about defaulting to JSON, which makes sense if you're doing AI-assisted debugging daily.
- skills.sh installs
- 300
- GitHub stars
- 771
- last updated
- Feb 8, 2026
Install
$ npx -y skills add decebals/claude-code-java --skill logging-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Logging Patterns Skill
Effective logging for Java applications with focus on structured, AI-parsable formats.
When to Use
- User says "add logging" / "improve logs" / "debug this"
- Analyzing application flow from logs
- Setting up structured logging (JSON)
- Request tracing with correlation IDs
- AI/Claude Code needs to analyze application behavior
AI-Friendly Logging
Key insight: JSON logs are better for AI analysis - faster parsing, fewer tokens, direct field access.
Why JSON for AI/Claude Code?
# Text format - AI must "interpret" the string
2026-01-29 10:15:30 INFO OrderService - Order 12345 created for user-789, total: 99.99
# JSON format - AI extracts fields directly
{"timestamp":"2026-01-29T10:15:30Z","level":"INFO","orderId":12345,"userId":"user-789","total":99.99}
| Aspect | Text | JSON |
|---|---|---|
| Parsing | Regex/interpretation | Direct field access |
| Token usage | Higher (repeated patterns) | Lower (structured) |
| Error extraction | Parse stack trace text | exception field |
| Filtering | grep patterns | jq queries |
Recommended Setup for AI-Assisted Development
Sponsors
Details
- Repository
- github.com/decebals/claude-code-java
- Categories
- DevOps & CI/CD, AI & Agent Building, Debugging, Java & JVM
- License
- MIT
- First seen
- Jun 11, 2026
More from decebals/claude-code-java
All 18- Jpa Patterns297
- Changelog Generator251
- Git Commit249
- Issue Triage240
- Java Code Review1.1K
- Clean Code427
- Concurrency Review384
- Solid Principles384
- Architecture Review374
- Design Patterns372
- Spring Boot Patterns358
- Java Migration357
- Security Audit347
- Performance Smell Detection341
- Test Quality336
- Api Contract Review315
- Maven Dependency Audit308