{"id":25428337,"url":"https://github.com/homoluctus/json-pyformatter","last_synced_at":"2026-04-25T23:37:12.966Z","repository":{"id":62572938,"uuid":"225100591","full_name":"homoluctus/json-pyformatter","owner":"homoluctus","description":"Python logging outputs as JSON","archived":false,"fork":false,"pushed_at":"2019-12-01T16:18:37.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T16:09:57.553Z","etag":null,"topics":["json","logging","python","python3"],"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/homoluctus.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":"2019-12-01T03:19:39.000Z","updated_at":"2020-04-14T09:46:43.000Z","dependencies_parsed_at":"2022-11-03T18:30:15.518Z","dependency_job_id":null,"html_url":"https://github.com/homoluctus/json-pyformatter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/homoluctus/json-pyformatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fjson-pyformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fjson-pyformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fjson-pyformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fjson-pyformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homoluctus","download_url":"https://codeload.github.com/homoluctus/json-pyformatter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homoluctus%2Fjson-pyformatter/sbom","scorecard":{"id":468376,"data":{"date":"2025-08-11","repo":{"name":"github.com/homoluctus/json-pyformatter","commit":"4c8109f099aaa49250c237a74067b7f7421bee8b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/homoluctus/json-pyformatter/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:29","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T13:07:08.472Z","repository_id":62572938,"created_at":"2025-08-19T13:07:08.472Z","updated_at":"2025-08-19T13:07:08.472Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32280980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"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","logging","python","python3"],"created_at":"2025-02-17T01:38:34.580Z","updated_at":"2026-04-25T23:37:12.950Z","avatar_url":"https://github.com/homoluctus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-pyformatter\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/homoluctus/json-pyformatter/Test)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/homoluctus/json-pyformatter?include_prereleases)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/json-pyformatter)\n![GitHub](https://img.shields.io/github/license/homoluctus/json-pyformatter)\n\nPython logging outputs as JSON.\u003cbr\u003e\nThis JsonFormatter is written in Pure Python.\n\n## Installation\n\n```bash\npip install json-pyformatter\n```\n\n## Usage\n\n```python\nimport logging\nfrom json_pyformmatter import JsonFormatter\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\nhandler = logging.StreamHandler()\nfields = ('levelname', 'filename', 'message')\nhandler.setFormatter(JsonFormatter(fields=fields))\nlogger.addHandler(hander)\n\nlogger.info('hello')\n```\n\ndefault fields is ('asctime', 'levelname', 'message')\u003cbr\u003e\nOther supported fields are:\n\n|field name|description|\n|:--:|:--|\n|name|Name of the logger (logging channel)|\n|levelno|Numeric logging level for the message\u003cbr\u003e(DEBUG, INFO, WARNING, ERROR, CRITICAL)|\n|levelname|Text logging level for the message\u003cbr\u003e(\"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\", \"CRITICAL\")|\n|pathname|Full pathname of the source file where the logging call was issued|\n|filename|Filename portion of pathname|\n|module|Module (name portion of filename)|\n|lineno|Source line number where the logging call was issued|\n|funcName|Function name|\n|created|Time when the LogRecord was created (time.time()return value)|\n|asctime|Textual time when the LogRecord was created|\n|msecs|Millisecond portion of the creation time|\n|relativeCreated|Time in milliseconds when the LogRecord was created, relative to the time the logging module was loaded (typically at application startup time)|\n|thread|Thread ID|\n|threadName|Thread name|\n|process|Process ID|\n|message|The result of record.getMessage(), computed just as the record is emitted|\n\nIn details, please refere to [logrecord-attributes](https://docs.python.org/3/library/logging.html#logrecord-attributes)\n\n## Output\n\n```bash\n{\"levelname\": \"INFO\", \"filename\": \"test_formatter.py\", \"message\": \"hello\"}\n```\n\nIf specify indent option as 2, the result is as follows:\n\n```bash\n{\n  \"levelname\": \"INFO\",\n  \"filename\": \"test_formatter.py\",\n  \"message\": \"hello\"\n}\n```\n\nWhen exc_info is True, the result includes traceback infomation as follows:\n\n```bash\n{\n  'asctime': '2019-12-01 13:58:34',\n  'levelname': 'ERROR',\n  'message': 'error occurred !!',\n  'traceback': [\n    'Traceback (most rec...ll last):',\n    'File \"/example/test..._exc_info',\n    'raise TypeError(message)',\n    'TypeError: error occurred !!'\n  ]\n}\n```\n\nLogging message type is dict:\n\n```bash\n{\n  'asctime': '2019-12-01 23:34:32',\n  'levelname': 'INFO',\n  'message': {\n    'id': '001',\n    'msg': 'This is test.',\n    'name': 'test'\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomoluctus%2Fjson-pyformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomoluctus%2Fjson-pyformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomoluctus%2Fjson-pyformatter/lists"}