{"id":20284416,"url":"https://github.com/artyom/logfeed","last_synced_at":"2025-07-12T04:35:00.606Z","repository":{"id":10011862,"uuid":"12048954","full_name":"artyom/logfeed","owner":"artyom","description":null,"archived":false,"fork":false,"pushed_at":"2013-08-30T12:18:34.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T09:49:30.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artyom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-12T05:57:22.000Z","updated_at":"2016-07-29T06:52:40.000Z","dependencies_parsed_at":"2022-08-07T05:15:22.604Z","dependency_job_id":null,"html_url":"https://github.com/artyom/logfeed","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyom%2Flogfeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyom%2Flogfeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyom%2Flogfeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artyom%2Flogfeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artyom","download_url":"https://codeload.github.com/artyom/logfeed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780465,"owners_count":20019058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T14:19:40.448Z","updated_at":"2025-03-04T03:42:23.762Z","avatar_url":"https://github.com/artyom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogFeed: read log messages from rotated files\n\n`LogFeed` can read messages from rotated log. Consider the usual setup for\n`messages` logfile in standard linux system:\n\n\t/var/log/messages.4.gz\n\t/var/log/messages.3.gz\n\t/var/log/messages.2.gz\n\t/var/log/messages.1\n\t/var/log/messages\n\n`LogFeed` can abstract this separation, so you can iterate over log messages\nfrom oldest to newest.\n\n## Features\n\n* uncompressed, gzipped (`.gz`) or bzipped (`.bz2`) files support;\n* stores log position, so on successive run only new messages would be read;\n* correctly handles log rotation (even while reading file);\n* locks on state file;\n* can be used in *follow mode* to continuously yield new messages as they're\n  become available.\n\n## Usage\n\n\tfrom logfeed import LogFeed\n\n\tsystem_logs = LogFeed('/var/log/syslog*')\n\tfor line in system_logs:\n\t    process(line)\n\nIf you need to be sure that log position is advanced only if line was\nsuccessfully processed, you can use the following syntax:\n\n\tfrom logfeed import LogFeed\n\n\tsystem_logs = LogFeed('/var/log/syslog*', consumer=process)\n\tfor line in system_logs:\n\t    pass\n\nIf `process` function raises an exception, log position won't be advanced\n(though you can have some duplicate lines on successive run).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartyom%2Flogfeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartyom%2Flogfeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartyom%2Flogfeed/lists"}