{"id":16907973,"url":"https://github.com/cjrh/arglog","last_synced_at":"2025-03-20T17:17:03.681Z","repository":{"id":57411435,"uuid":"95882399","full_name":"cjrh/arglog","owner":"cjrh","description":"Add root logger config to argparse automatically","archived":false,"fork":false,"pushed_at":"2020-08-23T13:29:39.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T09:28:05.253Z","etag":null,"topics":["argument-parser","logging"],"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/cjrh.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["cjrh"]}},"created_at":"2017-06-30T11:27:15.000Z","updated_at":"2020-08-23T13:29:42.000Z","dependencies_parsed_at":"2022-08-27T17:11:01.612Z","dependency_job_id":null,"html_url":"https://github.com/cjrh/arglog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjrh%2Farglog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjrh%2Farglog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjrh%2Farglog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjrh%2Farglog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjrh","download_url":"https://codeload.github.com/cjrh/arglog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244656740,"owners_count":20488640,"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":["argument-parser","logging"],"created_at":"2024-10-13T18:49:36.157Z","updated_at":"2025-03-20T17:17:03.661Z","avatar_url":"https://github.com/cjrh.png","language":"Python","funding_links":["https://github.com/sponsors/cjrh"],"categories":[],"sub_categories":[],"readme":".. image:: https://img.shields.io/badge/stdlib--only-yes-green.svg\n    :target: https://img.shields.io/badge/stdlib--only-yes-green.svg\n\n.. image:: https://travis-ci.org/cjrh/arglog.svg?branch=master\n    :target: https://travis-ci.org/cjrh/arglog\n\n.. image:: https://coveralls.io/repos/github/cjrh/arglog/badge.svg?branch=master\n    :target: https://coveralls.io/github/cjrh/arglog?branch=master\n\n.. image:: https://img.shields.io/pypi/pyversions/arglog.svg\n    :target: https://pypi.python.org/pypi/arglog\n\n.. image:: https://img.shields.io/github/tag/cjrh/arglog.svg\n    :target: https://img.shields.io/github/tag/cjrh/arglog.svg\n\n.. image:: https://img.shields.io/badge/install-pip%20install%20arglog-ff69b4.svg\n    :target: https://img.shields.io/badge/install-pip%20install%20arglog-ff69b4.svg\n\n\narglog\n======\n\n*Add logging options to argparse automatically*\n\nDemo\n----\n\n.. code:: python\n\n    # main.py\n    import argparse\n    import logging\n    import arglog\n\n    if __name__ == '__main__':\n        parser = argparse.ArgumentParser()\n        arglog.patch(parser)\n        args = parser.parse_args()\n\nThis will trigger the same effect as running:\n\n.. code:: python\n\n    logging.basicConfig(level='\u003clevel name\u003e')\n\nHowever, you now also have a new CLI option for your program:\n\n.. code:: bash\n\n    $ python main.py --loglevel=WARNING\n\nAll of the logging levels are supported, ``INFO``, ``DEBUG`` and so on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjrh%2Farglog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjrh%2Farglog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjrh%2Farglog/lists"}