{"id":28282170,"url":"https://github.com/bodgergely/spdlog-python","last_synced_at":"2025-06-17T04:31:45.951Z","repository":{"id":40256701,"uuid":"121904863","full_name":"bodgergely/spdlog-python","owner":"bodgergely","description":"python wrapper around C++ spdlog (git@github.com:gabime/spdlog.git)","archived":false,"fork":false,"pushed_at":"2024-05-20T15:21:52.000Z","size":166,"stargazers_count":63,"open_issues_count":9,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-19T22:25:56.555Z","etag":null,"topics":["gabime","logger","logging","pybind11","python","python-wrapper","spdlog"],"latest_commit_sha":null,"homepage":"","language":"C++","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/bodgergely.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}},"created_at":"2018-02-18T00:33:46.000Z","updated_at":"2025-05-10T20:40:44.000Z","dependencies_parsed_at":"2022-06-27T05:34:01.593Z","dependency_job_id":null,"html_url":"https://github.com/bodgergely/spdlog-python","commit_stats":{"total_commits":98,"total_committers":14,"mean_commits":7.0,"dds":"0.37755102040816324","last_synced_commit":"4723d51d7ca93d143c6da3f11b1285c4a173ca72"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bodgergely/spdlog-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgergely%2Fspdlog-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgergely%2Fspdlog-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgergely%2Fspdlog-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgergely%2Fspdlog-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodgergely","download_url":"https://codeload.github.com/bodgergely/spdlog-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgergely%2Fspdlog-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260293354,"owners_count":22987590,"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":["gabime","logger","logging","pybind11","python","python-wrapper","spdlog"],"created_at":"2025-05-21T14:19:31.371Z","updated_at":"2025-06-17T04:31:45.941Z","avatar_url":"https://github.com/bodgergely.png","language":"C++","readme":"[![Build Status](https://img.shields.io/github/actions/workflow/status/bodgergely/spdlog-python/ci.yaml?branch=master)](https://github.com/bodgergely/spdlog-python/actions)\n\nspdlog-python\n=============\n\npython wrapper around the fast C++ logger called [spdlog](https://github.com/gabime/spdlog)\n\n\nIntroduction\n============\n\nPython wrapper (pybind11) around the C++ spdlog logging library.\n\nWhy choose [spdlog](https://github.com/gabime/spdlog)?\n\nhttps://kjellkod.wordpress.com/2015/06/30/the-worlds-fastest-logger-vs-g3log/\n\nTry running [tests/spdlog_vs_logging.py](https://github.com/bodgergely/spdlog-python/blob/master/tests/test_spdlog.py) and see what results you get on your system.\n\nspdlog-python vs logging (standard lib)\n---------------------------------------\n\nHow many microseconds it takes on average to complete a log function (info(), debug() etc) using a FileLogger.\nOn reasonable sized log messages spdlog takes **4% (async mode enabled)** and **6% (sync mode)** of the time it would take to complete using the standard logging module.\n\nAsync mode with 8MB queue with blocking mode.\n\n| msg len (bytes)   | spdlog **sync** (microsec)| spdlog **async** (microsec)| logging (microsec)   |\n| -------           | :--------:      | :--------:      | :--------:                                |\n|  10               |  1.2            |  0.87           |   24.6                                    |\n|  100              |  1.2            |  1.03           |   24.6                                    |\n|  300              |  1.5            |  1.07           |   24.9                                    |\n|  1000             |  2.4            |  1.16           |   26.8                                    |\n|  5000             |  6.2            |  2.31           |   31.7                                    |\n|  20000            |  15.3           |  7.51           |   48.0                                    |\n\nInstallation\n============\n\n1) `pip install spdlog` will get a distribution from pypi.org\n\nor\n\n2) from github:\n\n`pip install pybind11` - if missing\n\n```bash\ngit clone https://github.com/bodgergely/spdlog-python.git\ncd spdlog-python\ngit submodule update --init --recursive\npython setup.py install\n```\n\nUsage\n=====\n\n```python\n./python\nimport spdlog as spd\nlogger = spd.FileLogger('fast_logger', '/tmp/spdlog_example.log')\nlogger.set_level(spd.LogLevel.INFO)\nlogger.info('Hello World!')\nlogger.debug('I am not so important.')\n```\n\nTo run the speed test:\n\n```bash\npython ./tests/spdlog_vs_logging.py\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgergely%2Fspdlog-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodgergely%2Fspdlog-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgergely%2Fspdlog-python/lists"}