{"id":16243351,"url":"https://github.com/kpetremann/futurelog","last_synced_at":"2025-07-28T08:05:45.436Z","repository":{"id":57432711,"uuid":"406403266","full_name":"kpetremann/futurelog","owner":"kpetremann","description":"Consume logs by block in async application","archived":false,"fork":false,"pushed_at":"2021-09-14T18:41:18.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T13:06:32.051Z","etag":null,"topics":["async","deferred","logging"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/FutureLog/","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/kpetremann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-14T14:35:19.000Z","updated_at":"2021-09-14T18:41:20.000Z","dependencies_parsed_at":"2022-08-28T23:22:02.492Z","dependency_job_id":null,"html_url":"https://github.com/kpetremann/futurelog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"kpetremann/python_template","purl":"pkg:github/kpetremann/futurelog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpetremann%2Ffuturelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpetremann%2Ffuturelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpetremann%2Ffuturelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpetremann%2Ffuturelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpetremann","download_url":"https://codeload.github.com/kpetremann/futurelog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpetremann%2Ffuturelog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267482004,"owners_count":24094508,"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-07-28T02:00:09.689Z","response_time":68,"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":["async","deferred","logging"],"created_at":"2024-10-10T14:14:39.832Z","updated_at":"2025-07-28T08:05:45.412Z","avatar_url":"https://github.com/kpetremann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# Installation\n\n```pip install futurelog```\n\n# Usage\n\n## Introduction\n\nThe goal of this library is to provide a way to defer logs and consume (print) them when needed, in an async application.\n\nFor instance, it would perfectly fit a config deployer in async. It would help to keep messages grouped by servers.\n\nUsage should be limited to reporting and not error/exception logging.\nAlso you should ensure you catch all possible exception in your program in your entrypoint, in order to consume all logs before exiting your application.\n\n## Create a logger\n\n```python\nfrom futurelog import FutureLogger\n\nfuture_logger = FutureLogger(__name__)\n```\n\n## Register logs\n\nThe methods supported are: `.debug()`, `.info()`, `.warning()`, `.error()`, `.critical()`\n\n```python\nfuture_logger.debug(topic, msg)\n```\n\nExample:\n```python\nfuture_logger.debug(\"server1\", \"deploying stuff 1\")\nfuture_logger.error(\"server1\", \"failed\")\nfuture_logger.debug(\"server2\", \"deploying stuff 1\")\nfuture_logger.warning(\"server2\", \"success\")\n```\n\n## Consume logs\n\n### One specific logger\n\n```python\nlogger.consume(topic)\n```\n\nExample:\n```python\nfuture_logger.consume(\"server1\")\nfuture_logger.consume(\"server2\")\n```\n\n### All loggers for a topic (one for each module)\n\n```python\nFutureLogger.consume_all_logger_for(topic)\n```\n\nExample:\n```python\nFutureLogger.consume_all_logger_for(\"server1\")\nFutureLogger.consume_all_logger_for(\"server2\")\n```\n\n### All unconsumed logger\n\n```python\nFutureLogger.consume_all_logger()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpetremann%2Ffuturelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpetremann%2Ffuturelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpetremann%2Ffuturelog/lists"}