{"id":13501614,"url":"https://github.com/BNMetrics/logme","last_synced_at":"2025-03-29T09:30:58.090Z","repository":{"id":29659216,"uuid":"122384914","full_name":"BNMetrics/logme","owner":"BNMetrics","description":"Python Logging For Humans (Also supports configurable color logging for the terminal!)","archived":false,"fork":false,"pushed_at":"2023-01-02T19:07:46.000Z","size":1937,"stargazers_count":532,"open_issues_count":16,"forks_count":20,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-27T18:11:32.208Z","etag":null,"topics":["colorlogger","for-humans","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BNMetrics.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"2018-02-21T19:46:25.000Z","updated_at":"2025-02-09T18:18:28.000Z","dependencies_parsed_at":"2023-01-14T15:24:07.799Z","dependency_job_id":null,"html_url":"https://github.com/BNMetrics/logme","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BNMetrics%2Flogme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BNMetrics%2Flogme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BNMetrics%2Flogme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BNMetrics%2Flogme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BNMetrics","download_url":"https://codeload.github.com/BNMetrics/logme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246167054,"owners_count":20734378,"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":["colorlogger","for-humans","logging","python"],"created_at":"2024-07-31T22:01:43.739Z","updated_at":"2025-03-29T09:30:58.052Z","avatar_url":"https://github.com/BNMetrics.png","language":"Python","readme":"=================================\nLogme - Python Logging for Humans\n=================================\n\n.. image:: https://badge.fury.io/py/logme.svg\n    :target: https://pypi.org/project/logme/\n\n.. image:: https://travis-ci.org/BNMetrics/logme.svg?branch=master\n    :target: https://travis-ci.org/BNMetrics/logme\n\n.. image:: https://codecov.io/gh/BNMetrics/logme/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/BNMetrics/logme\n\n.. image:: https://readthedocs.org/projects/logme/badge/?version=latest\n    :target: https://logme.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\nLogme is a Python package that makes logging simple and robust. If you have found\nlogging in Python not so straight forward, download this package and give it a try! :)\n\n\n\nV1.3.0 Updates\n---------------------\n``logme.ini`` file now supports custom ``datefmt`` and ``style``! Thanks to `@afunTW \u003chttps://github.com/afunTW\u003e`_ suggestion! :)\n\nHere is an example of how you can specify these parameters in your ``logme.ini`` configuration:\n\n.. code-block:: ini\n\n    [my_config]\n    level = DEBUG\n    formatter =\n        fmt: {asctime} - {name} - {levelname} - {message}\n        datefmt: %Y/%m/%d\n        style: {\n    stream =\n        type: StreamHandler\n        active: True\n        level: DEBUG\n    file =\n        type: FileHandler\n        active: True\n        level: DEBUG\n        formatter: {name} :: {funcName} :: {levelname} :: {message}\n        filename: mylogpath/foo.log\n\nNote: Only top level ``master_formatter`` supports parameters as shown above, individual handler formatter will not.\n\n\n\nTerminal Color Output\n---------------------\n\n**logme** supports color and styling output in the terminal!\n\nThe colors and style is **customizable** in ``logme.ini``, here is a screenshot of how it looks like in the terminal:\n\n\n.. image:: http://logme.readthedocs.io/en/latest/_images/demo_color.png\n\nTo use color output in logme, make sure your logme package and ``logme.ini`` is `up-to-date \u003chttps://logme.readthedocs.io/en/latest/?badge=latest#upgrading\u003e`_ if you are using a version before 1.2.0.\n\nCheck the configuration details `here \u003chttps://logme.readthedocs.io/en/latest/guide/quickstart.html#colors\u003e`_.\n\n\n\nIn A Nutshell\n-------------\n\nIf you have a function you want to log, you can do this in your python file:\n\n.. code-block:: python\n\n    import logme\n\n\n    @logme.log\n    def my_awesome_function(my_arg, logger=None):\n        logger.info('this is my log message')\n        \"\"\"rest of the function\"\"\"\n\n\nYou can do the same with classes too:\n\n.. code-block:: python\n\n    import logme\n\n\n    @logme.log\n    class MyAwesomeClass:\n        def my_function(self, my_arg):\n            self.logger.info('this is my log message')\n\n\n\npretty nice right? :)\n\nTo get started, head to the `quickstart \u003chttps://logme.readthedocs.io/en/latest/guide/quickstart.html\u003e`_  page.\n\nInstalling Logme\n----------------\n::\n\n    $ pipenv install logme\n    ✨🍰✨\n\n\nDocumentation\n-------------\n\nYou can find the documentation at https://logme.readthedocs.io/en/latest/ .\nGive it a try!\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBNMetrics%2Flogme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBNMetrics%2Flogme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBNMetrics%2Flogme/lists"}