{"id":"0f19d6af-2903-4ecd-93d2-ad6951e919ea","shortId":"uK7NNJ","kind":"skill","title":"180-java-observability-logging","tagline":"Use when you need to implement or improve Java logging and observability — including selecting SLF4J with Logback/Log4j2, applying proper log levels (ERROR, WARN, INFO, DEBUG, TRACE), parameterized logging, secure logging without sensitive data exposure, environment-specific conf","description":"# Java Logging Best Practices\n\nImplement effective Java logging following standardized frameworks, meaningful log levels, core practices (parameterized logging, exception handling, no sensitive data), flexible configuration, security-conscious logging, monitoring and alerting, and comprehensive logging validation through testing.\n\n**What is covered in this Skill?**\n\n- Standardized framework selection: SLF4J facade with Logback or Log4j2\n- Meaningful and consistent log levels: ERROR, WARN, INFO, DEBUG, TRACE\n- Core practices: parameterized logging, proper exception handling, avoiding sensitive data\n- Configuration: environment-specific (logback.xml, log4j2.xml), output formats, log rotation\n- Security: mask sensitive data, control log access, secure transmission, GDPR/HIPAA compliance\n- Log monitoring and alerting: centralized aggregation (ELK, Splunk, Loki), automated alerts\n- Logging validation through testing: assert log messages, verify formats, test levels, measure performance impact\n\n**Scope:** The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.\n\n## Constraints\n\nBefore applying any logging recommendations, ensure the project compiles. Compilation failure is a blocking condition. After applying improvements, run full verification.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately — do not proceed until resolved\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed good/bad examples, constraints, and safeguards for each logging pattern\n\n## When to use this skill\n\n- Improve logging\n- Apply logging\n- Refactor logging\n- Add logging support\n\n## Workflow\n\n1. **Compile project before logging changes**\n\nRun `./mvnw compile` or `mvn compile` and stop immediately if compilation fails.\n\n2. **Read logging reference and assess current observability**\n\nRead `references/180-java-observability-logging.md` and evaluate framework usage, log levels, sensitive-data handling, and config gaps.\n\n3. **Apply logging and observability improvements**\n\nImplement selected framework/configuration/practice changes, including secure logging and monitoring integration where applicable.\n\n4. **Verify with full build**\n\nRun `./mvnw clean verify` or `mvn clean verify` after applying improvements.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/180-java-observability-logging.md](references/180-java-observability-logging.md).","tags":["180","java","observability","logging","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code","claude-code-skills"],"capabilities":["skill","source-jabrena","skill-180-java-observability-logging","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/180-java-observability-logging","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,626 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:36.370Z","embedding":null,"createdAt":"2026-04-18T22:02:10.299Z","updatedAt":"2026-04-26T12:53:36.370Z","lastSeenAt":"2026-04-26T12:53:36.370Z","tsv":"'/mvnw':207,229,277,335 '1':270 '180':1 '2':288 '3':311 '4':329 'access':133 'add':266 'aggreg':143 'alert':75,141,148 'appli':23,177,185,200,213,237,240,262,312,343 'applic':181,328 'area':176 'assert':153 'assess':293 'autom':147 'avoid':114 'base':179 'best':46 'block':197 'build':333 'central':142 'chang':215,275,320 'clean':230,234,336,340 'code':171 'compil':192,193,208,211,218,271,278,281,286 'complianc':137 'comprehens':77 'condit':198 'conf':43 'config':309 'configur':68,117 'conscious':71 'consist':99 'constraint':183,248,351 'control':131 'core':58,107,175 'cover':84 'current':294 'data':38,66,116,130,306 'debug':30,105 'detail':245,347 'effect':49 'elk':144 'ensur':189 'environ':41,119 'environment-specif':40,118 'error':27,102 'evalu':299 'exampl':169,182,247,349 'except':62,112 'exposur':39 'facad':92 'fail':219,287 'failur':194 'flexibl':67 'follow':52 'format':124,157 'framework':54,89,300 'framework/configuration/practice':319 'full':203,332 'gap':310 'gdpr/hipaa':136 'good/bad':170,246 'guidanc':348 'handl':63,113,307 'immedi':221,284 'impact':162 'implement':11,48,317 'improv':13,201,238,260,316,344 'includ':18,321 'info':29,104 'integr':326 'java':3,14,44,50 'java-observability-log':2 'level':26,57,101,159,303 'log':5,15,25,33,35,45,51,56,61,72,78,100,110,125,132,138,149,154,187,253,261,263,265,267,274,290,302,313,323 'log4j2':96 'log4j2.xml':122 'logback':94 'logback.xml':121 'logback/log4j2':22 'loki':146 'mandatori':205 'mask':128 'meaning':55,97 'measur':160 'messag':155 'monitor':73,139,325 'mvn':210,233,280,339 'need':9 'observ':4,17,295,315 'organ':167 'output':123 'parameter':32,60,109 'pattern':172,254 'perform':161 'practic':47,59,108 'proceed':224 'project':191,272 'proper':24,111 'read':241,289,296 'recommend':178,188 'refactor':264 'refer':165,243,291,345 'references/180-java-observability-logging.md':297,353,354 'resolv':226 'rotat':126 'run':202,206,228,276,334 'safeguard':250 'safeti':216 'scope':163 'secur':34,70,127,134,322 'security-consci':69 'see':352 'select':19,90,318 'sensit':37,65,115,129,305 'sensitive-data':304 'skill':87,259 'skill-180-java-observability-logging' 'slf4j':20,91 'source-jabrena' 'specif':42,120 'splunk':145 'standard':53,88 'stop':220,283 'support':268 'test':81,152,158 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'trace':31,106 'transmiss':135 'usag':301 'use':6,257 'valid':79,150 'verif':204 'verifi':156,227,231,235,330,337,341 'warn':28,103 'without':36 'workflow':269","prices":[{"id":"4bea04e0-04ba-466a-a40e-88ace03f7d15","listingId":"0f19d6af-2903-4ecd-93d2-ad6951e919ea","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:10.299Z"}],"sources":[{"listingId":"0f19d6af-2903-4ecd-93d2-ad6951e919ea","source":"github","sourceId":"jabrena/cursor-rules-java/180-java-observability-logging","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/180-java-observability-logging","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:10.299Z","lastSeenAt":"2026-04-26T12:53:36.370Z"}],"details":{"listingId":"0f19d6af-2903-4ecd-93d2-ad6951e919ea","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"180-java-observability-logging","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"de2099385cfd5214db2b08c56e64fdcb893d4058","skill_md_path":"skills/180-java-observability-logging/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/180-java-observability-logging"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"180-java-observability-logging","license":"Apache-2.0","description":"Use when you need to implement or improve Java logging and observability — including selecting SLF4J with Logback/Log4j2, applying proper log levels (ERROR, WARN, INFO, DEBUG, TRACE), parameterized logging, secure logging without sensitive data exposure, environment-specific configuration, log aggregation and monitoring, or validating logging through tests. This should trigger for requests such as Improve logging; Apply logging; Refactor logging; Add logging support. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/180-java-observability-logging"},"updatedAt":"2026-04-26T12:53:36.370Z"}}