{"id":16642925,"url":"https://github.com/nir0s/logrotated","last_synced_at":"2025-10-24T13:55:41.071Z","repository":{"id":53671615,"uuid":"57448271","full_name":"nir0s/logrotated","owner":"nir0s","description":"A human friendly interface to logrotate","archived":false,"fork":false,"pushed_at":"2021-03-19T21:28:52.000Z","size":43,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T13:44:15.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nir0s.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2016-04-30T15:13:27.000Z","updated_at":"2019-07-31T07:29:26.000Z","dependencies_parsed_at":"2022-09-06T14:40:07.970Z","dependency_job_id":null,"html_url":"https://github.com/nir0s/logrotated","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nir0s/logrotated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nir0s%2Flogrotated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nir0s%2Flogrotated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nir0s%2Flogrotated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nir0s%2Flogrotated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nir0s","download_url":"https://codeload.github.com/nir0s/logrotated/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nir0s%2Flogrotated/sbom","scorecard":{"id":688732,"data":{"date":"2025-08-11","repo":{"name":"github.com/nir0s/logrotated","commit":"7a2d7a9ae167e1a0e19e066f638ed6a8286086f8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"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":"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":"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":"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":"Binary-Artifacts","score":5,"reason":"binaries present in source code","details":["Warn: binary detected: logrotated/constants.pyc:1","Warn: binary detected: logrotated/serv.pyc:1","Warn: binary detected: logrotated/tests/__init__.pyc:1","Warn: binary detected: logrotated/tests/test_serv.pyc:1","Warn: binary detected: logrotated/utils.pyc:1"],"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":"Code-Review","score":0,"reason":"Found 0/4 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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":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"}}]},"last_synced_at":"2025-08-22T01:44:07.766Z","repository_id":53671615,"created_at":"2025-08-22T01:44:07.766Z","updated_at":"2025-08-22T01:44:07.766Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280806833,"owners_count":26394451,"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-10-24T02:00:06.418Z","response_time":73,"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":[],"created_at":"2024-10-12T08:06:49.461Z","updated_at":"2025-10-24T13:55:41.028Z","avatar_url":"https://github.com/nir0s.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"logrotated\n==========\n\n[![Build Status](https://travis-ci.org/nir0s/logrotated.svg?branch=master)](https://travis-ci.org/nir0s/logrotated)\n[![PyPI](http://img.shields.io/pypi/dm/logrotated.svg)](http://img.shields.io/pypi/dm/logrotated.svg)\n[![PypI](http://img.shields.io/pypi/v/logrotated.svg)](http://img.shields.io/pypi/v/logrotated.svg)\n\nWhy does your volume keep exploding? It's not ISIS! It's your logs!\n\n`logrotated` is a CLI and Pythonic API for `logrotate` and `LogRotateWin` (SOON!). It aims to make logrotation easier without  having to know the ins and outs of `logrotate`.\n\n## Features\n\n\n## Compatibility\n\nCurrently, tested on Python 2.6.x and 2.7.x\nWill be adding Python 3.x support soon enough.\n\n## Installation\n\n```shell\nsudo pip install logrotated\n```\n\nFor dev:\n\n```shell\nsudo pip install https://github.com/nir0s/logrotated/archive/master.tar.gz\n```\n\n## Usage\n\n```shell\n$ sudo rotatethis --help\nUsage: rotatethis [OPTIONS] PATH...\n\n  Generates a logrotate configuration and deploys it if necessary.\n\nOptions:\n  -n, --name TEXT                 The name of the logrotation script.\n                                  [required]\n  -d, --deploy                    Deploy the configuration on the current\n                                  machine.\n  -f, --frequency [daily|weekly|monthly|yearly]\n                                  How often to rotate the files.\n  -s, --size TEXT                 Size of file at which rotation will take\n                                  place. (e.g. 100k, 100M, 100G)\n  -k, --keep TEXT                 How many files to keep when rotating.\n  -c, --compress                  Whether to compress rotated log files or\n                                  not.\n  --create TEXT...                Created new log files using `mod user\n                                  password`.\n  -l, --delay-compression TEXT    Delay the compression by one file. This will\n                                  leave one rotated log file uncompressed\n                                  until the next rotation.\n  --nocompress                    Negates --compress (in case it is configured\n                                  in the main logrotate config.\n  --dont-rotate-empty             Do not rotate empty files.\n  -m, --ignore-missing            If there are no logs, don't fail.. just\n                                  continue.\n  --shared-postscript             Run postrotate script only after all logs in\n                                  path have been checked.\n  -p, --post-rotate TEXT          A script to run post rotation. This is\n                                  required by some applications.\n  --overwrite                     Whether to overwrite a logrotate config or\n                                  not.\n  -v, --verbose\n  --help                          Show this message and exit.\n...\n```\n\n\n## Rotating Paths\n```shell\n$ rotatethis '/var/log/mongodb/*.log' '/var/log/mongos' --name mongo -v -p '/usr/bin/killall -SIGUSR1 mongod' -p '/usr/bin/killall -SIGUSR1 mongos' --keep 5 --frequency daily --create 644 user group --dont-rotate-empty --deploy\n...\n\nINFO - Generating logrotate config...\nINFO - Deploying /tmp/logrotate-test/test to /etc/logrotate.d/test...\nINFO - Deployment successful!\n...\n\n$ cat /etc/logrotate.d/mongo\n\n/var/log/mongodb/*.log /var/log/mongos { \n    daily\n    rotate 5\n    notifempty\n    compress\n    create 644 user group \n    postrotate\n        /usr/bin/killall -SIGUSR1 mongod\n        /usr/bin/killall -SIGUSR1 mongos\n    endscript\n}\n```\n\n### Generating only\n\nIf the `--deploy` flag isn't provided, the file will be saved under /tmp/logrotate-NAME/NAME for future use.\n\n## Python API\n\n```python\nraise NotImplementedError()\n```\n\n## Testing\n\n```shell\ngit clone git@github.com:nir0s/logrotated.git\ncd logrotated\npip install tox\ntox\n```\n\n## Contributions..\n\nPull requests are always welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir0s%2Flogrotated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnir0s%2Flogrotated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir0s%2Flogrotated/lists"}