{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/15"},{"label":"Logging","url":"https://skillfed.io/packages/category/system-logging"}],"enrichment":{"capability":"Pygtail reads only the new lines from a log file since the last read, tracking position with an offset file and handling log rotation automatically.","skillfed_tags":["log-tailing","offset-tracking"],"use_cases":["Monitor application logs in real time by reading only new entries since the last check, avoiding re-processing old lines.","Build log aggregation pipelines that track which lines have been shipped to a central system, using the offset file as a checkpoint.","Process rotated logs without losing track of position across rotation boundaries, especially in high-volume logging scenarios.","Implement custom log watchers that need fine-grained control over when offset state is persisted to disk."],"what_it_does":"Pygtail is a Python port of logcheck's logtail2 utility. It maintains an offset file to track which lines of a log file have already been read, then returns only the new lines on subsequent calls. It handles log rotation transparently, supporting both copytruncate-style rotation (where the file is copied then truncated) and inode-based rotation (where the file is moved and a new one created).\n\nThe package works both as a command-line tool and as a Python library. From the CLI, you point it at a log file and it prints unread lines; in code, you instantiate a Pygtail object and iterate over lines. It offers fine-grained control over when the offset is written back to disk, custom log rotation patterns, and options to read from the end of large files if the offset file is missing.","worth_installing":"Yes, if you need incremental log reading with rotation support and can accept a copyleft license. The package is stable and has no known vulnerabilities, but maintenance is stalled since 2022; verify compatibility with your Python version and log rotation setup before relying on it for production use."},"id":"pygtail","links":{"html":"https://skillfed.io/packages/pygtail","md":"https://skillfed.io/packages/pygtail.md","pypi":"https://pypi.org/project/pygtail/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2022-11-06","license_spdx":null,"license_treatment":"copyleft","name":"pygtail","python_support":"unspecified","summary":"Reads log file lines that have not been read."},"popularity":{"monthly_downloads":225547,"position":9220,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.14.0"}
