{"id":33899883,"url":"https://github.com/geopozo/logistro","last_synced_at":"2026-03-10T01:34:36.797Z","repository":{"id":263645333,"uuid":"890976989","full_name":"geopozo/logistro","owner":"geopozo","description":"Wrapper for logging / envoltura de logging ","archived":false,"fork":false,"pushed_at":"2025-11-12T21:04:31.000Z","size":3571,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-04T01:52:20.177Z","etag":null,"topics":["active","python-utility"],"latest_commit_sha":null,"homepage":"https://geopozo.github.io/logistro/","language":"HTML","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/geopozo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-19T14:11:43.000Z","updated_at":"2025-11-12T21:04:32.000Z","dependencies_parsed_at":"2025-12-12T02:03:44.616Z","dependency_job_id":null,"html_url":"https://github.com/geopozo/logistro","commit_stats":null,"previous_names":["geopozo/logistro"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/geopozo/logistro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopozo%2Flogistro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopozo%2Flogistro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopozo%2Flogistro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopozo%2Flogistro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geopozo","download_url":"https://codeload.github.com/geopozo/logistro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopozo%2Flogistro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30320889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["active","python-utility"],"created_at":"2025-12-11T22:44:35.465Z","updated_at":"2026-03-10T01:34:36.789Z","avatar_url":"https://github.com/geopozo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **logistro (lo-hī-stro)**\n\n`logistro` is an extremely light addition to `logging`, providing sensible defaults.\n\nIt also includes `getPipeLogger()` which can be passed to `Popen()` so that its\n`stderr` is piped to the already thread-safe `logging` library.\n\n## Which logger level should I use?\n\n`debug2` I use if I'm in a situation where it's okay to dump large amounts of\ninformation. I'm planning on scrolling.\n\n`info` I will maybe use at the beginning and end of functions called.\n\n`debug` Might print stuff from inside functions or it might print shortened\nversioning of `debug2`.\n\nWarning, Error, Critical, Exception, these are all more obvious.\n\n## Quickstart\n\n```python\nimport logistro\n\nlogger = logistro.getLogger(__name__)\n\nlogger.debug2(...) # new!\nlogger.debug(...) # or debug1()\nlogger.info(...)\nlogger.warning(...)\nlogger.error(...)\nlogger.critical(...)\nlogger.exception(...) # always inside except:\n\n# For subprocesses:\n\npipe, logger = logistro.getPipeLogger(__name__+\"-subprocess\")\nsubprocess.Popen(cli_command, stderr=pipe)\nos.close(pipe) # eventually\n```\n\n## CLI Flags\n\n* `--logistro-level DEBUG|DEBUG2|INFO|WARNING|ERROR|CRITICAL`\n* `--logistro-human` (default)\n* `--logistro-structured` which outputs JSON\n\nThe help for CLI commands can be included in your program:\n\n```\nparser = argparse.ArgumentParser(parents=[logistro.parser])\n```\n\n### Functions\n\n* `logistro.set_structured()`\n* `logistro.set_human()`\n\n*Generally, they must be called before any other logging call (See note below).*\n\n## Additionally\n\n\n`logistro.betterConfig(...)` applies our formats and levels. It accepts the same\narguments as `logging.basicConfig(...)` except `format=`, which it ignores.\n**It is better to call this early in a multithread program.**\n\n`logistro.getLogger(...)` will ensure `betterConfig()`.\n\nYou can use our two formatters manually instead:\n\n* `human_formatter`\n* `structured_formatter`\n\n\n## Changing Logger Formatter Mid-Execution\n\nWith a typical setup, calling `set_structured()` or `set_human()`\nand then `logistro.coerce_logger(logistro.getLogger())` will change the format.\n\nSee [the tech note](TECH_NOTE.md) for an intro into the complexities of `logging`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopozo%2Flogistro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeopozo%2Flogistro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopozo%2Flogistro/lists"}