skills/logging-java/SKILL.md
Configure structured logging with SLF4J + Logback for Java Spring Boot applications. Covers MDC context, correlation IDs, log levels, sensitive data filtering, and JSON formatting. Use when: setting up logging, configuring Logback, adding MDC context, filtering sensitive data, or troubleshooting logging issues in Java.
npx skillsauth add congiuluc/my-awesome-copilot logging-javaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
{} placeholders.logback-spring.xml| Level | Use When | Examples |
|-------|----------|---------|
| TRACE | Internal framework detail | Hibernate SQL, Spring MVC handler mapping |
| DEBUG | Developer diagnostics | Cache hit/miss, config loaded, request parsed |
| INFO | Normal operations | Request started, user logged in, order created |
| WARN | Expected but notable | Not found, validation failed, slow query |
| ERROR | Unexpected failures | Unhandled exceptions, external service down |
// ✅ Good — parameterized with SLF4J
log.info("Order {} created for user {}", orderId, userId);
// ✅ Good — with MDC context
MDC.put("orderId", orderId);
log.info("Processing order");
MDC.remove("orderId");
// ❌ Bad — string concatenation (evaluated even if level disabled)
log.info("Order " + orderId + " created for user " + userId);
@Component
@Order(Ordered.HIGHEST_PRECEDENCE)
public class CorrelationIdFilter extends OncePerRequestFilter {
private static final String HEADER = "X-Correlation-ID";
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
String correlationId = request.getHeader(HEADER);
if (correlationId == null || correlationId.isBlank()) {
correlationId = UUID.randomUUID().toString();
}
MDC.put("correlationId", correlationId);
response.setHeader(HEADER, correlationId);
try {
chain.doFilter(request, response);
} finally {
MDC.remove("correlationId");
}
}
}
logging:
level:
root: INFO
com.myapp: DEBUG
org.springframework.security: WARN
org.hibernate.SQL: WARN
org.hibernate.type.descriptor.sql.BasicBinder: WARN
{} placeholders)finally blocktools
Build VS Code extensions with TypeScript. Covers extension anatomy, activation events, commands, tree views, webview panels, language features, testing, and publishing. Use when: creating a new VS Code extension, adding commands/views/providers, building webview UIs, implementing language server features, testing extensions, or packaging for the marketplace.
development
Track implementations, features, bugs, and releases in a versioning document. Use when: adding a commit, completing a feature, fixing a bug, or preparing a release. Automatically updates CHANGELOG.md following Keep a Changelog format and Semantic Versioning.
development
Write frontend tests using Vitest and React Testing Library. Use when: testing React components, hooks, user interactions, form submissions, accessibility assertions, or mocking API services.
development
Write Angular frontend tests using Jasmine, Karma, and Angular TestBed. Use when: testing Angular components, services, pipes, directives, user interactions, form submissions, accessibility assertions, or mocking HTTP services.