{"id":20322297,"url":"https://github.com/okomestudio/socket-log-receiver","last_synced_at":"2025-04-11T19:13:09.306Z","repository":{"id":57469111,"uuid":"144614735","full_name":"okomestudio/socket-log-receiver","owner":"okomestudio","description":"Socket log receiver","archived":false,"fork":false,"pushed_at":"2024-03-12T21:23:03.000Z","size":75,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"development","last_synced_at":"2025-04-09T17:46:21.896Z","etag":null,"topics":["logging","logging-server","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okomestudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-08-13T17:53:13.000Z","updated_at":"2024-06-12T07:17:02.000Z","dependencies_parsed_at":"2024-02-17T21:28:46.766Z","dependency_job_id":"fa7e6996-a40e-4260-9a86-b8a685b4ea55","html_url":"https://github.com/okomestudio/socket-log-receiver","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"f9efb6a2029c5b2a9d48f44f6bcb69135f607c16"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okomestudio%2Fsocket-log-receiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okomestudio%2Fsocket-log-receiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okomestudio%2Fsocket-log-receiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okomestudio%2Fsocket-log-receiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okomestudio","download_url":"https://codeload.github.com/okomestudio/socket-log-receiver/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465345,"owners_count":21108244,"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":["logging","logging-server","python"],"created_at":"2024-11-14T19:20:34.996Z","updated_at":"2025-04-11T19:13:09.287Z","avatar_url":"https://github.com/okomestudio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/pypi/l/socket-log-receiver.svg)](https://pypi.org/project/socket-log-receiver/)\n[![PyPI Version](https://badge.fury.io/py/socket-log-receiver.svg)](https://pypi.org/project/socket-log-receiver/)\n[![Package Status](https://img.shields.io/pypi/status/socket-log-receiver.svg)](https://pypi.org/project/resconfig/)\n[![pyversion Status](https://img.shields.io/pypi/pyversions/socket-log-receiver.svg)](https://img.shields.io/pypi/pyversions/socket-log-receiver.svg)\n[![CircleCI](https://circleci.com/gh/okomestudio/socket-log-receiver.svg?style=shield)](https://circleci.com/gh/okomestudio/socket-log-receiver)\n[![Coverage Status](https://coveralls.io/repos/github/okomestudio/socket-log-receiver/badge.svg?branch=development)](https://coveralls.io/github/okomestudio/socket-log-receiver?branch=development\u0026kill_cache=1)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n\n# Socket Log Receiver\n\n`socket_log_receiver` is a light-weight socket log receiving server.\nThe server aggregates messages from multi-process applications via a\nsocket and logs them to a single file. The service is used with\nPython's stdlib `logging` package, which by default does not support\nmulti-process writes to a single file.\n\n\n## Installation\n\n``` shell\n$ pip install socket-log-receiver\n```\n\n\n## Basic Usage\n\nThe receiver service should be run as a service:\n\n``` shell\n$ python -m socket_log_receiver  # as a module\n$ log_receiver                   # as a command-line program\n```\n\nThese are equivalent.\n\nBy default, the receiver service starts listening on `localhost:9020`.\nThese can be changed through CLI options; see the Help section below.\n\nIn the application, use `SocketHandler` to send logs to the receiver\nservice.\n\n``` python\nfrom logging.handlers import SocketHandler\n\nhandler = SocketHandler('localhost', 9020)  # handler to send logs to localhost:9020\nlogging.root.addHandler(handler)            # add the socket handler to the root logger\n```\n\nThis way, the root logger sends logging messages to the receiver service.\n\n### Help\n\n``` shell\n$ python -m socket_log_receiver -h\n$ log_receiver -h\n```\n\n### Undefined Signal\n\nThe receiver service's configuration is managed by\n[resconfig](https://github.com/okomestudio/resconfig). By default, the\ndynamic configuration update is trigged by `SIGHUP`. Some systems\nmight not make this signal available, in which case you could use a\ndifferent signal for the trigger using the command-line option, e.g.\n\n``` shell\n$ log_receiver --reloader-signal SIGUSR2\n```\n\n\n## Development\n\n``` shell\n$ pip install -e .[dev]\n$ pre-commit install\n```\n\n\n### Running Tests\n\n``` shell\n$ pip install -e .[test]\n$ pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokomestudio%2Fsocket-log-receiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokomestudio%2Fsocket-log-receiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokomestudio%2Fsocket-log-receiver/lists"}