Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器unknown未标认证来源可访问许可证需确认审计未展示

analyze-logs分析日志

Agent Skill

analyze-logs 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,952

周安装

248

下载量

1,984
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:analyze-logs(分析日志)
来源仓库:https://evlog.dev
仓库路径:analyze-logs
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

读取并分析本地应用的宽事件日志以调试错误和理解行为模式。

  • 适用于应用故障排查,支持按关键词或错误消息快速定位问题。
  • 可检查请求模式、慢端点和错误率等性能指标。analyze-logs 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 日志存储在 .evlog/logs/ 目录下,需确保路径可访问。
  • 安装方式未知,使用前请核实运行环境兼容性。

SKILL.md

Analyze application logs

Read and analyze structured wide-event logs from the local .evlog/logs/ directory to debug errors, investigate performance issues, and understand application behavior.

When to Use

  • User asks to debug an error, investigate a bug, or understand why something failed
  • User asks about request patterns, slow endpoints, or error rates
  • User asks "what happened" or "what's going on" with their application
  • User asks to analyze logs, check recent errors, or review application behavior
  • User mentions a specific error message or status code they're seeing

Finding the logs

Logs are written by evlog's file system drain as .jsonl files, organized by date.

Format detection: The drain supports two modes:

  • NDJSON (default, pretty: false): One compact JSON object per line. Parse line-by-line.
  • Pretty (pretty: true): Multi-line indented JSON per event. Parse by reading the entire file and splitting on top-level objects (e.g. JSON.parse('[' + content.replace(/\}\n\{/g, '},{') + ']')) or use a streaming JSON parser.

Always check the first few bytes of the file to detect the format: if the second character is a newline or ", it's NDJSON; if it's a space or newline followed by spaces, it's pretty-printed.

Search order — check these locations relative to the project root:

  1. .evlog/logs/ (default)
  2. Any .evlog/logs/ inside app directories (monorepos: apps/*/.evlog/logs/)

Use glob to find log files:

.evlog/logs/*.jsonl
*/.evlog/logs/*.jsonl
apps/*/.evlog/logs/*.jsonl

Files are named by date: 2026-03-14.jsonl. Start with the most recent file.

If no logs are found

The file system drain may not be enabled. Guide the user to set it up:

import { createFsDrain } from 'evlog/fs'

// Nuxt / Nitro: server/plugins/evlog-drain.ts
export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('evlog:drain', createFsDrain())
})

// Hono / Express / Elysia: pass in middleware options
app.use(evlog({ drain: createFsDrain() }))

// Fastify: pass in plugin options
await app.register(evlog, { drain: createFsDrain() })

// NestJS: pass in module options
EvlogModule.forRoot({ drain: createFsDrain() })

// Standalone: pass to initLogger
initLogger({ drain: createFsDrain() })

After setup, the user needs to trigger some requests to generate logs, then re-analyze.

Log format

Each line is a self-contained JSON object (wide event). Key fields:

FieldTypeDescription
timestampstringISO 8601 timestamp
levelstringinfo, warn, error, debug
servicestringService name
environmentstringdevelopment, production, etc.
methodstringHTTP method (GET, POST, etc.)
pathstringRequest path (/api/checkout)
statusnumberHTTP response status code
durationstringRequest duration ("234ms")
requestIdstringUnique request identifier
errorobjectError details: name, message, stack, statusCode, data
error.data.whystringHuman-readable explanation of what went wrong
error.data.fixstringSuggested fix for the error
sourcestringclient for browser logs, absent for server logs
userAgentobjectParsed browser/OS/device info

All other fields are application-specific context added via log.set() (e.g. user, cart, payment).

How to analyze

Step 1: Read the most recent log file

Read the latest .jsonl file. Each line is one JSON event. Parse each line independently.

Step 2: Identify the relevant events

Filter based on the user's question:

  • Errors: look for "level":"error" or status >= 400
  • Specific endpoint: match on path
  • Slow requests: parse duration (e.g. "706ms") and filter high values
  • Specific user/action: match on application-specific fields
  • Client-side issues: filter by "source":"client"
  • Time range: compare timestamp values

Step 3: Analyze and explain

For each relevant event:

  1. What happened: summarize the path, method, status, level
  2. Why it failed (errors): read error.message, error.data.why, and the stack trace
  3. How to fix: check error.data.fix for suggested remediation
  4. Context: examine application-specific fields for business context (user info, payment details, etc.)
  5. Patterns: look for recurring errors, degrading performance, or correlated failures

Analysis patterns

Find all errors

Filter: level === "error"
Group by: error.message or path
Look for: recurring patterns, common failure modes

Find slow requests

Filter: parse duration string, compare > threshold (e.g. 1000ms)
Sort by: duration descending
Look for: specific endpoints, time-of-day patterns

Trace a specific request

Filter: requestId === "the-request-id"
Result: single wide event with all context for that request

Error rate by endpoint

Group events by: path
Count: total events vs error events per path
Look for: endpoints with high error ratios

Client vs server errors

Split by: source === "client" vs no source field
Compare: error patterns between client and server
Look for: client errors that don't have corresponding server errors (network issues)

Important notes

  • Each line is a complete, self-contained event. Unlike traditional logs, you don't need to correlate multiple lines — one line has all the context for one request.
  • The error.data.why and error.data.fix fields are evlog-specific structured error fields. When present, they provide the most actionable information.
  • Duration values are strings with units (e.g. "706ms"). Parse the numeric part for comparisons.
  • Events with "source":"client" originated from browser-side logging and were sent to the server via the transport endpoint.
  • Log files are .gitignore'd automatically — they exist only on the local machine or server where the app runs.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

75.16%
按下载量换算1,491

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills