When designing and implementing web interfaces to ensure they are usable by everyone.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When setting up telemetry, debugging distributed systems, or standardizing application output.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Logs are the black box recorder of your system. When failures happen at 2 AM in production, logs are your only witness. This skill ensures application state and failures are highly searchable, machine-readable, and traceable across system boundaries WITHOUT leaking sensitive user data.
console.log or print statementscorrelation_id (or trace_id) at HTTP entry point and pass through all downstream callslogger.info("User " + userId + " failed to login") (unqueryable)❌ Anti-pattern (String concatenation, no context, no redaction):
// BAD: Unstructured, concatenated
console.log('User ' + req.user.id + ' logged in at ' + new Date());
// BAD: No correlation ID
logger.info('Processing order');
logger.info('Order processed');
// BAD: Leaking PII and secrets
logger.error('Failed to connect: ' + process.env.DB_PASSWORD);
logger.info('User email: ' + user.email + ' password hash: ' + user.passwordHash);
// BAD: Expected error logged as ERROR
try {
const user = await User.findById(userId);
} catch (e) {
logger.error('User not found'); // WRONG level
}
✅ Correct pattern (Structured JSON, correlation IDs, redacted):
// CORRECT: Structured JSON with context
logger.info('User login successful', {
userId: 'user_123', // Anonymized or hashed
correlationId: req.id,
duration: Date.now() - req.startTime,
timestamp: new Date().toISOString()
});
// CORRECT: Correlation ID flows through system
const requestId = req.headers['x-request-id'] || uuid();
req.correlationId = requestId;
// Pass to downstream calls
await orderService.process(order, { correlationId: requestId });
// CORRECT: Redaction middleware
logger.addRedaction([
process.env.DB_PASSWORD,
/\d{4}-\d{4}-\d{4}-\d{4}/, // Credit card pattern
/@\w+\.\w+/, // Email pattern
]);
// CORRECT: Proper error logging with stack trace
try {
const user = await User.findById(userId);
} catch (error) {
logger.warn('User not found', {
userId,
correlationId: req.correlationId,
message: error.message
// Stack trace logged by error handler, not here
});
}
// CORRECT: Full context on errors
logger.error('Database connection failed', {
error: error.message, // Not the password!
code: error.code,
stack: error.stack,
correlationId: req.correlationId,
timestamp: new Date().toISOString(),
severity: 'critical'
});
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
When designing and implementing web interfaces to ensure they are usable by everyone.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When creating or extending an HTTP API for client consumption.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When improving read performance and reducing database load.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When configuring automated build, test, and deployment workflows for a repository.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When asynchronously reviewing peer code before merging into the main branch.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
When addressing slow application endpoints, high database CPU usage, or standardizing data access patterns.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.