{"id":28351688,"url":"https://github.com/itsayellow/logrolling","last_synced_at":"2025-07-20T16:04:46.860Z","repository":{"id":70038456,"uuid":"194166494","full_name":"itsayellow/logrolling","owner":"itsayellow","description":"An encapsulation of python logging to make using it easier and more pythonic.","archived":false,"fork":false,"pushed_at":"2020-02-26T07:06:31.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T07:43:06.012Z","etag":null,"topics":["logging","python"],"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/itsayellow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2019-06-27T21:38:17.000Z","updated_at":"2020-02-26T07:06:33.000Z","dependencies_parsed_at":"2023-02-23T21:00:53.680Z","dependency_job_id":null,"html_url":"https://github.com/itsayellow/logrolling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsayellow/logrolling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsayellow%2Flogrolling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsayellow%2Flogrolling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsayellow%2Flogrolling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsayellow%2Flogrolling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsayellow","download_url":"https://codeload.github.com/itsayellow/logrolling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsayellow%2Flogrolling/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152309,"owners_count":23884486,"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","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":["logging","python"],"created_at":"2025-05-27T22:11:22.084Z","updated_at":"2025-07-20T16:04:46.854Z","avatar_url":"https://github.com/itsayellow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logrolling\n\nLike log-rolling in real life, logrolling takes an awkward activity,\n(using logging), and attempts to make it seem effortless.\n\nAn encapsulation of python logging to make using it easier and more\npythonic.\n\n## Use\n\nYou only need to use logrolling in the top module.\n```\nlogger = logrolling.LogWrapper(\n    __name__,\n    [\n        \"imported_module1\",\n        \"imported_module2\",\n        \"imported_module3\",\n    ],\n    use_console=True,\n)\nlogger.add_filehandler(\"log.txt\")\nlogger.debug(\"Starting logging\")\n```\n\nThen, in the imported modules, you can either use logging or logroller.\n\n`logging` example.  The following would be at the top of `imported_module1`:\n```\nimport logging\n\nlogger = logging.getLogger(__name__)\nlogger.addHandler(logging.NullHandler())\n```\n\n`logrolloing` example.  The following would be at the top of `imported_module1`:\n```\n# logging for library defaults to NullHandler unless enabled by importing file\n# use_console=False because importing file is already enabling it (don't dup)\nlogger = logrolling.LogWrapper(__name__, use_console=False)\nlogger.add_nullhandler()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsayellow%2Flogrolling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsayellow%2Flogrolling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsayellow%2Flogrolling/lists"}