application-logging
アプリケーション全体で構造化されたログを収集・分析し、ELKスタックなどを活用して、アプリケーションのログ設定や挙動分析を効率的に行うSkill。
📜 元の英語説明(参考)
Implement structured logging across applications with log aggregation and centralized analysis. Use when setting up application logging, implementing ELK stack, or analyzing application behavior.
🇯🇵 日本人クリエイター向け解説
アプリケーション全体で構造化されたログを収集・分析し、ELKスタックなどを活用して、アプリケーションのログ設定や挙動分析を効率的に行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o application-logging.zip https://jpskill.com/download/21336.zip && unzip -o application-logging.zip && rm application-logging.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21336.zip -OutFile "$d\application-logging.zip"; Expand-Archive "$d\application-logging.zip" -DestinationPath $d -Force; ri "$d\application-logging.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
application-logging.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
application-loggingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 8
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
アプリケーションロギング
目次
概要
効果的なデバッグと監視のために、適切なレベル、コンテキスト、および一元的な集約を備えた包括的な構造化ロギングを実装します。
使用場面
- アプリケーションのデバッグ
- 監査証跡の作成
- パフォーマンス分析
- コンプライアンス要件
- ログの一元的な集約
クイックスタート
最小限の動作例:
// logger.js
const winston = require("winston");
const logFormat = winston.format.combine(
winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
winston.format.errors({ stack: true }),
winston.format.json(),
);
const logger = winston.createLogger({
level: process.env.LOG_LEVEL || "info",
format: logFormat,
defaultMeta: {
service: "api-service",
environment: process.env.NODE_ENV || "development",
},
transports: [
new winston.transports.Console({
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple(),
),
}),
new winston.transports.File({
filename: "logs/error.log",
// ... (完全な実装についてはリファレンスガイドを参照してください)
リファレンスガイド
references/ ディレクトリ内の詳細な実装:
| ガイド | 内容 |
|---|---|
| Node.js Structured Logging with Winston | Node.jsでのWinstonによる構造化ロギング |
| Express HTTP Request Logging | ExpressでのHTTPリクエストロギング |
| Python Structured Logging | Pythonでの構造化ロギング |
| Flask Integration | Flaskとの統合 |
| ELK Stack Setup | ELK Stackのセットアップ |
| Logstash Configuration | Logstashの設定 |
ベストプラクティス
✅ 実施すべきこと
- 構造化されたJSONロギングを使用する
- トレースのためにリクエストIDを含める
- 適切なレベルでログを記録する
- エラーログにコンテキストを追加する
- ログローテーションを実装する
- タイムスタンプを一貫して使用する
- ログを一元的に集約する
- 機密データをフィルタリングする
❌ 実施すべきでないこと
- パスワードや秘密情報をログに記録する
- すべての操作をINFOレベルでログに記録する
- 非構造化メッセージを使用する
- ログの保存制限を無視する
- コンテキスト情報を省略する
- 本番環境でstdoutにログを記録する
- 無制限のログファイルを作成する
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Application Logging
Table of Contents
Overview
Implement comprehensive structured logging with proper levels, context, and centralized aggregation for effective debugging and monitoring.
When to Use
- Application debugging
- Audit trail creation
- Performance analysis
- Compliance requirements
- Centralized log aggregation
Quick Start
Minimal working example:
// logger.js
const winston = require("winston");
const logFormat = winston.format.combine(
winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
winston.format.errors({ stack: true }),
winston.format.json(),
);
const logger = winston.createLogger({
level: process.env.LOG_LEVEL || "info",
format: logFormat,
defaultMeta: {
service: "api-service",
environment: process.env.NODE_ENV || "development",
},
transports: [
new winston.transports.Console({
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple(),
),
}),
new winston.transports.File({
filename: "logs/error.log",
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Node.js Structured Logging with Winston | Node.js Structured Logging with Winston |
| Express HTTP Request Logging | Express HTTP Request Logging |
| Python Structured Logging | Python Structured Logging |
| Flask Integration | Flask Integration |
| ELK Stack Setup | ELK Stack Setup |
| Logstash Configuration | Logstash Configuration |
Best Practices
✅ DO
- Use structured JSON logging
- Include request IDs for tracing
- Log at appropriate levels
- Add context to error logs
- Implement log rotation
- Use timestamps consistently
- Aggregate logs centrally
- Filter sensitive data
❌ DON'T
- Log passwords or secrets
- Log at INFO for every operation
- Use unstructured messages
- Ignore log storage limits
- Skip context information
- Log to stdout in production
- Create unbounded log files
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (2,727 bytes)
- 📎 references/elk-stack-setup.md (854 bytes)
- 📎 references/express-http-request-logging.md (1,179 bytes)
- 📎 references/flask-integration.md (1,267 bytes)
- 📎 references/logstash-configuration.md (442 bytes)
- 📎 references/nodejs-structured-logging-with-winston.md (926 bytes)
- 📎 references/python-structured-logging.md (808 bytes)
- 📎 scripts/validate-api.sh (440 bytes)