{"id":30961546,"url":"https://github.com/singhravi1/drf-tracking-logger","last_synced_at":"2026-05-18T03:31:46.970Z","repository":{"id":57424146,"uuid":"220987882","full_name":"singhravi1/drf-tracking-logger","owner":"singhravi1","description":"Log request data as per your logging configuration","archived":false,"fork":false,"pushed_at":"2023-04-06T16:17:56.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-05T01:59:28.511Z","etag":null,"topics":["django","django-rest-framework","logger","logging"],"latest_commit_sha":null,"homepage":"","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/singhravi1.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-11T13:31:31.000Z","updated_at":"2024-08-13T17:40:32.000Z","dependencies_parsed_at":"2024-11-16T14:36:05.942Z","dependency_job_id":"34fc5aec-9781-47f1-a5ae-e4d53dedc868","html_url":"https://github.com/singhravi1/drf-tracking-logger","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"7ca2102410c695fa23cf29b4363b61dcf42fc9fa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/singhravi1/drf-tracking-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhravi1%2Fdrf-tracking-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhravi1%2Fdrf-tracking-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhravi1%2Fdrf-tracking-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhravi1%2Fdrf-tracking-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singhravi1","download_url":"https://codeload.github.com/singhravi1/drf-tracking-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhravi1%2Fdrf-tracking-logger/sbom","scorecard":{"id":827068,"data":{"date":"2025-08-11","repo":{"name":"github.com/singhravi1/drf-tracking-logger","commit":"40e03defd474a82bb93516364936ba68f04f2cf9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-6 / GHSA-2f9x-5v75-3qv4","Warn: Project is vulnerable to: PYSEC-2019-17 / GHSA-337x-4q8g-prc5","Warn: Project is vulnerable to: PYSEC-2020-36 / GHSA-3gh2-xw74-jmcw","Warn: Project is vulnerable to: PYSEC-2018-2 / GHSA-5hg3-6c2f-f3wr","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2019-10 / GHSA-6c7v-2f49-8h26","Warn: Project is vulnerable to: PYSEC-2019-13 / GHSA-6r97-cj55-9hrq","Warn: Project is vulnerable to: PYSEC-2019-79 / GHSA-7rp2-fm2h-wchj","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2017-44 / GHSA-9r8w-6x8c-6jr9","Warn: Project is vulnerable to: PYSEC-2019-11 / GHSA-c4qh-4vgv-qc6g","Warn: Project is vulnerable to: PYSEC-2019-12 / GHSA-h5jv-4p7w-64jg","Warn: Project is vulnerable to: PYSEC-2020-35 / GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2018-5 / GHSA-r28v-mw67-m5p9","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2019-14 / GHSA-v9qg-3j8p-r63v","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2019-18 / GHSA-wh4h-v3f2-r2pp","Warn: Project is vulnerable to: PYSEC-2020-263 / GHSA-fx83-3ph3-9j2q","Warn: Project is vulnerable to: GHSA-gw84-84pc-xp82"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T16:49:13.731Z","repository_id":57424146,"created_at":"2025-08-23T16:49:13.731Z","updated_at":"2025-08-23T16:49:13.731Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["django","django-rest-framework","logger","logging"],"created_at":"2025-09-11T18:02:38.479Z","updated_at":"2026-05-18T03:31:46.961Z","avatar_url":"https://github.com/singhravi1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## DRF Request logger\n\n[![PyPi version](https://badgen.net/pypi/v/drf-tracking-logger/)](https://pypi.org/project/drf-tracking-logger/)\n\nA spinoff of the [drf-tracking](https://github.com/aschn/drf-tracking) to forward the logging to the standard output instead of saving it in the database\n\n## Installation\n\n```bash\npip install drf-tracking-logger\n```\n\n## Usage\n\nTo use a specific logger name, set an environment variable\n`TRACKING LOGGER`.\n\nThe package provides a mixin `LoggingMixin` which you can include to your class based views to log the requests.\n\n*Example*,\n```python\nfrom rest_framework.generics import GenericAPIView\nfrom rest_framework.mixins import ListModelMixin\nfrom drf_tracking_logger.mixins import LoggingMixin\n\nclass AnyRandomView(LoggingMixin, ListModelMixin, GenericAPIView):\n    ...\n```\n\n## Options\n- `logging_methods` : This attribute can used to strip down the request methods which needs to be logged. **It logs all the methods by default**.\n- `should_log` : This method can be used to customize the logic to determine the logging.\n- `handle_log` : You can override this method to change the logging behavior. It sends the log to the configured logger by default.\n- `sensitive_fields` : By default, any key name which has any of `'key', 'secret', 'password', 'signature'` in its name, will get its value hidden. But you can extend this list by adding more using this attribute.\n\n## Logging Overview\nYou'll get these attributes for every request/response cycle to a view that uses the mixin:\n\n Model field name | Description | Model field type\n------------------|-------------|-----------------\n`user` | User if authenticated, None if not | Foreign Key\n`requested_at` | Date-time that the request was made | DateTimeField\n`response_ms` | Number of milliseconds spent in view code | PositiveIntegerField\n`path` | Target URI of the request, e.g., `\"/api/\"` | CharField\n`view` | Target VIEW of the request, e.g., `\"views.api.ApiView\"` | CharField\n`view_method` | Target METHOD of the VIEW of the request, e.g., `\"get\"`| CharField\n`remote_addr` | IP address where the request originated (X_FORWARDED_FOR if available, REMOTE_ADDR if not), e.g., `\"127.0.0.1\"` | GenericIPAddressField\n`host` | Originating host of the request, e.g., `\"example.com\"` | URLField\n`method` | HTTP method, e.g., `\"GET\"` | CharField\n`query_params` | Dictionary of request query parameters, as text | TextField\n`data` | Dictionary of POST data (JSON or form), as text | TextField\n`response` | JSON response data. **This will be skipped for GET requests** | TextField\n`status_code` | HTTP status code, e.g., `200` or `404` | PositiveIntegerField\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghravi1%2Fdrf-tracking-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinghravi1%2Fdrf-tracking-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghravi1%2Fdrf-tracking-logger/lists"}