Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Scrapyd Log Parser

Python Version License: MIT Status

A high-performance tool designed to parse Scrapyd logs and generate detailed statistics, providing deep insights that Scrapyd doesn't provide natively.

Features

  • High Performance: Leverages ProcessPoolExecutor for parallel log parsing, maximizing CPU utilization.
  • Organized Output: Centralizes all parsed JSON data into a dedicated scrapydlogparser directory, mirroring your project's structure.
  • Loop Mode: Automatically monitors and re-parses logs at configurable intervals.
  • Smart Cleanup: Automatically removes orphaned JSON files when their corresponding log files are deleted.
  • Incremental Parsing: Only processes new or modified logs by checking file size against existing data.
  • Error Detection: Specifically detects critical unhandled errors and crashes, labeling them for easy identification.

Quick Start

Installation

Install in editable mode for development:

pip install -e .

Basic Usage

Run the parser by pointing it to your Scrapyd logs directory:

scrapyd-logparser /path/to/scrapyd/logs

By default, this will:

  1. Create a scrapydlogparser/ directory inside your logs folder.
  2. Generate individual .json files for every log, mirroring the project/spider structure.
  3. Save a global scrapydlogparser.json summary in the same directory.

CLI Options

Option Shorthand Description Default
--interval -i Interval in seconds for continuous monitoring (loop mode). 5
--output -o Path to the summary JSON file. logs/scrapydlogparser/scrapydlogparser.json
--force -f Forces a full re-parse of all log files. Disabled
--json-dir Custom directory to store individual JSON files. logs/scrapydlogparser/

Advanced Usage

Continuous Monitoring (Loop Mode)

To keep your statistics updated in real-time (e.g., every 60 seconds):

scrapyd-logparser ./logs --interval 60

Data Structure

The tool transforms your standard Scrapyd logs into a clean, queryable JSON structure:

logs/
├── project/
│   └── spider/
│       └── job.log
└── scrapydlogparser/
    ├── scrapydlogparser.json (Global Summary)
    └── project/
        └── spider/
            └── job.json (Detailed stats)

Release files for scrapyd-logparser 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapyd-logparser 0.1.0b1
File Size Uploaded
scrapyd_logparser-0.1.0b1.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapyd-logparser 0.1.0b1
File Interpreter ABI Platform
scrapyd_logparser-0.1.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / scrapyd_logparser-0.1.0b1.tar.gz

Download URL scrapyd_logparser-0.1.0b1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2dfe43e9a00e60b0ca100f4e319b84a05e1b91754d710bcf4746987040123dd4
BLAKE2b-256 checksum
How to use checksums
3adfbfa7d9a6fc6b5d5bd69781b1335af575190fac58bca8822b786bd7634070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / scrapyd_logparser-0.1.0b1-py3-none-any.whl

Download URL scrapyd_logparser-0.1.0b1-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca33dd0106b49d85a8a9f4458ea49df12284fd1ee32ffb0cd07889279209bfe
BLAKE2b-256 checksum
How to use checksums
8c942a8d77a37ad62e6a1ca59683a82679855e9c264c5dc385822f6877f34283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0b1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page