{"id":30004812,"url":"https://github.com/beda-software/aidbox-logging-py","last_synced_at":"2025-09-03T06:36:43.317Z","repository":{"id":268951646,"uuid":"905948535","full_name":"beda-software/aidbox-logging-py","owner":"beda-software","description":"Aidbox $loggy python logging","archived":false,"fork":false,"pushed_at":"2024-12-19T23:21:38.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-05T07:46:24.656Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beda-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T20:47:54.000Z","updated_at":"2024-12-19T23:21:35.000Z","dependencies_parsed_at":"2024-12-19T23:18:50.631Z","dependency_job_id":"a94a92f9-bc32-4216-86e4-3775a623f876","html_url":"https://github.com/beda-software/aidbox-logging-py","commit_stats":null,"previous_names":["beda-software/aidbox-logging-py"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/beda-software/aidbox-logging-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Faidbox-logging-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Faidbox-logging-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Faidbox-logging-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Faidbox-logging-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beda-software","download_url":"https://codeload.github.com/beda-software/aidbox-logging-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Faidbox-logging-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273403950,"owners_count":25099299,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-05T07:40:11.260Z","updated_at":"2025-09-03T06:36:43.276Z","avatar_url":"https://github.com/beda-software.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build status](https://github.com/beda-software/aidbox-logging-py/actions/workflows/main.yml/badge.svg)](https://github.com/beda-software/aidbox-logging-py/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/beda-software/aidbox-logging-py/branch/master/graph/badge.svg)](https://codecov.io/gh/beda-software/aidbox-logging-py)\n[![pypi](https://img.shields.io/pypi/v/aidbox-logging.svg)](https://pypi.org/project/aidbox-logging)\n[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![Supported Python version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/release/python-311/)\n\n# aidbox-logging-py\nAidbox $loggy python logging handler with queue\n\n## Installation\n\nInstall from pypi as `aidbox-logging`\n\n## Usage\n\n```python\nfrom aidbox_logging import init_queued_aidbox_loggy_handler, enable_excepthook_logging\n\n\nlogging.basicConfig(\n    format=\"[%(asctime)s] [%(process)d] [%(levelname)s] %(name)s %(message)s\",\n    datefmt=\"%Y-%m-%d %H:%M:%S %z\",\n)\nroot_logger = logging.getLogger()\nroot_logger.setLevel(logging.DEBUG)\nif env_config.loggy_url:\n    loggy_handler = init_queued_aidbox_loggy_handler(\n        env_config.loggy_url,\n        app=\"lab-backend\",\n        version=f\"{version.__version__}-{version.__build_commit_hash__}\",\n        meta={\n            \"env\": env_config.lab_room_id,\n        },\n    )\n\n    # By default all log messages will be handled by loggy\n    root_logger.addHandler(loggy_handler)\n\n    # By default gunicorn errors are not propagated, so we handle it explicitly\n    logging.getLogger(\"gunicorn.error\").addHandler(loggy_handler)\n\n    # Optional: enable excepthook logging that intercepts all exceptions inside threads\n    enable_excepthook_logging()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Faidbox-logging-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeda-software%2Faidbox-logging-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Faidbox-logging-py/lists"}