log-analysis by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill log-analysis日志对于调试和监控至关重要。有效的日志分析可以快速识别问题并支持根因分析。
最小工作示例:
// Good: Structured logs (machine-readable)
logger.info({
level: 'INFO',
timestamp: '2024-01-15T10:30:00Z',
service: 'auth-service',
user_id: '12345',
action: 'user_login',
status: 'success',
duration_ms: 150,
ip_address: '192.168.1.1'
});
// Bad: Unstructured logs (hard to parse)
console.log('User 12345 logged in successfully in 150ms from 192.168.1.1');
// JSON Format (Elasticsearch friendly)
{
"@timestamp": "2024-01-15T10:30:00Z",
"level": "ERROR",
"service": "api-gateway",
"trace_id": "abc123",
"message": "Database connection failed",
"error": {
"type": "ConnectionError",
"code": "ECONNREFUSED"
}
// ... (see reference guides for full implementation)
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录下的详细实现:
每周安装数
139
代码仓库
GitHub 星标数
121
首次出现
2026年1月21日
安全审计
安装于
opencode117
gemini-cli113
codex111
cursor105
claude-code102
github-copilot94
Logs are critical for debugging and monitoring. Effective log analysis quickly identifies issues and enables root cause analysis.
Minimal working example:
// Good: Structured logs (machine-readable)
logger.info({
level: 'INFO',
timestamp: '2024-01-15T10:30:00Z',
service: 'auth-service',
user_id: '12345',
action: 'user_login',
status: 'success',
duration_ms: 150,
ip_address: '192.168.1.1'
});
// Bad: Unstructured logs (hard to parse)
console.log('User 12345 logged in successfully in 150ms from 192.168.1.1');
// JSON Format (Elasticsearch friendly)
{
"@timestamp": "2024-01-15T10:30:00Z",
"level": "ERROR",
"service": "api-gateway",
"trace_id": "abc123",
"message": "Database connection failed",
"error": {
"type": "ConnectionError",
"code": "ECONNREFUSED"
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Structured Logging | Structured Logging |
| Log Levels & Patterns | Log Levels & Patterns |
| Log Analysis Tools | Log Analysis Tools |
| Common Log Analysis Queries | Common Log Analysis Queries |
Weekly Installs
139
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode117
gemini-cli113
codex111
cursor105
claude-code102
github-copilot94
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
90,800 周安装
Claude测试模式:基于代理的实时集成测试与YAML规范方法
158 周安装
Claude AI金融分析师技能 - 智能财务分析与投资决策助手 | 开源AI工具
158 周安装
投资银行推介演示文稿模板填充指南:金融PPT制作与格式化标准
159 周安装
Tailwind UI 模式与组件库 | Tailwind v4 配置、按钮、卡片、表单组件代码示例
159 周安装
Git代码审查技能:自动化审查未提交更改,提升代码质量与安全性
159 周安装
codeagent-wrapper:多AI后端代码生成与分析工具,支持Codex、Claude、Gemini
159 周安装