{"id":15853208,"url":"https://github.com/omrilotan/jonson","last_synced_at":"2026-02-07T14:02:46.638Z","repository":{"id":247588653,"uuid":"823577595","full_name":"omrilotan/jonson","owner":"omrilotan","description":"Out-of-the-box JSON logger","archived":false,"fork":false,"pushed_at":"2024-07-09T15:04:08.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-06T19:51:16.988Z","etag":null,"topics":["json","logger","structured-logging"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/jonson/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omrilotan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-03T09:47:22.000Z","updated_at":"2024-07-09T15:04:12.000Z","dependencies_parsed_at":"2024-07-09T15:33:29.768Z","dependency_job_id":"b2535d57-2d4e-4080-9f9c-c1ea8d12672d","html_url":"https://github.com/omrilotan/jonson","commit_stats":null,"previous_names":["omrilotan/jonson","omrilotan/jsonlogger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omrilotan/jonson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fjonson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fjonson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fjonson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fjonson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omrilotan","download_url":"https://codeload.github.com/omrilotan/jonson/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fjonson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29196625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T12:38:28.597Z","status":"ssl_error","status_checked_at":"2026-02-07T12:38:23.888Z","response_time":63,"last_error":"SSL_read: 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":["json","logger","structured-logging"],"created_at":"2024-10-05T19:03:29.378Z","updated_at":"2026-02-07T14:02:46.621Z","avatar_url":"https://github.com/omrilotan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jonson [![](https://img.shields.io/pypi/v/jonson?style=flat-square)](https://pypi.org/project/jonson/) [![](https://img.shields.io/static/v1?label=github\u0026message=jonson\u0026labelColor=black\u0026color=3572a5\u0026style=flat-square\u0026logo=github)](https://github.com/omrilotan/jonson)\n\n## out-of-the-box, ready-to-use JSON logger\n\n\n```py\nfrom jonson import logger\n\nlogger.info(\"Something going as expected\", { \"host\": socket.gethostname() })\nlogger.warn(\"Something must have gone terribly wrong\")\n\nexcept Exception as e:\n    logger.error(e, { description: \"something descriptive\" })\n```\n\n### Log level\nCreate logger instance with a minimal log level\n\n```py\nfrom jonson import Logger\n\nlogger = Logger(\"warn\")\n\nlogger.info(\"Something going as expected\", { \"host\": socket.gethostname() }) # ignored\nlogger.warn(\"Something must have gone terribly wrong\") # sent\n```\n\n#### Log levels hirarchy\n\nA few synonyms are available for convenience\n\n1. `trace`, `verbose`\n1. `debug`\n1. `info`, `log`\n1. `warn`\n1. `error`\n1. `critical`, `fatal`, `panic`\n\nFor example, a logger with log level \"warn\" will only print logs with level \"warn\", \"error\", or \"critical\".\n\n### Arguments\n**Create**: Logger class accepts one or two arguments:\n\n1. `{string}` Case insensitive name of **minimal** log level. defaults to `\"info\"`\n1. `{dictionary}` {'Key':'Value'} pairs, optional. Persistent enrichment fields for all log records\n\n```py\nlogger = Logger(os.environ[\"LOG_LEVEL\"], { \"host\": socket.gethostname() })\n```\n\n**Send**: Logger functions accept one or two arguments:\n\n1. `{any}` Record's \"message\" field. Traditionally this would be a string or an exception.\n1. `{dictionary}` {'Key':'Value'} pairs, optional. Values should be JSON serializable\n\n```py\nlogger.info(\"something, something\", { dark: \"side\" })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrilotan%2Fjonson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomrilotan%2Fjonson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrilotan%2Fjonson/lists"}