log_analyzer_search
Search log files for patterns with context lines, using regex or text matching with filters for log levels and output formats.
Instructions
Search for patterns in a log file with context lines.
Args:
file_path: Path to the log file to search
pattern: Search pattern (regex or plain text)
is_regex: Treat pattern as regex (default: False, plain text)
case_sensitive: Case-sensitive search (default: False)
context_lines: Lines of context before/after match (0-10, default: 3)
max_matches: Maximum matches to return (1-200, default: 50)
level_filter: Filter by log level (ERROR, WARN, INFO, DEBUG)
response_format: Output format - 'markdown' or 'json'
Returns:
Search results with matches and surrounding context.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| pattern | Yes | ||
| is_regex | No | ||
| case_sensitive | No | ||
| context_lines | No | ||
| max_matches | No | ||
| level_filter | No | ||
| response_format | No | markdown |