{"id":15980703,"url":"https://github.com/macbre/monolog-python","last_synced_at":"2025-05-06T23:15:55.544Z","repository":{"id":57443040,"uuid":"47845301","full_name":"macbre/monolog-python","owner":"macbre","description":"Python's logging formatter compatible with","archived":false,"fork":false,"pushed_at":"2016-01-03T10:41:06.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T23:15:31.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/macbre/monolog-utils","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/macbre.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}},"created_at":"2015-12-11T18:55:57.000Z","updated_at":"2024-02-13T08:07:50.000Z","dependencies_parsed_at":"2022-09-04T22:22:04.569Z","dependency_job_id":null,"html_url":"https://github.com/macbre/monolog-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fmonolog-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fmonolog-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fmonolog-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fmonolog-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macbre","download_url":"https://codeload.github.com/macbre/monolog-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782835,"owners_count":21803410,"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":[],"created_at":"2024-10-08T00:21:53.380Z","updated_at":"2025-05-06T23:15:55.479Z","avatar_url":"https://github.com/macbre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monolog-python\nPython's logging formatter compatible with monolog-utils. Works great with syslogng/elastic/kibana trio.\n\n## Install\n\n```\npip install monolog-python\n```\n\n## Example\n\n```python\nimport logging\nfrom monolog import MonologHandler\n\n\ndef fun():\n    return 2/0\n\n\nlogger = logging.getLogger('monolog.example')\nlogger.addHandler(MonologHandler())  # send message to a local syslog\n\ntry:\n    fun()\nexcept ZeroDivisionError:\n    logger.error('fun() call raised an exception', exc_info=True, extra={'context': {'my_value': 3}}))\n```\n\nOr run:\n\n```\n$ python monolog/examples/example.py\n```\n\n```json\n{\n  \"@context\": {\n    \"exception\": {\n      \"class\": \"ZeroDivisionError\",\n      \"message\": \"integer division or modulo by zero\",\n      \"trace\": [\n        \"  File \\\"monolog/examples/example.py\\\", line 32, in \u003cmodule\u003e\\n    fun()\\n\",\n        \"  File \\\"monolog/examples/example.py\\\", line 7, in fun\\n    return 2/0\\n\"\n      ]\n    },\n    \"my_value\": 3\n  },\n  \"@fields\": {\n    \"filename\": \"example.py\",\n    \"lineno\": 34\n  },\n  \"@message\": \"fun() call raised an exception\",\n  \"@source_host\": \"debian\",\n  \"@timestamp\": \"2016-01-02T22:45:33.336\",\n  \"program\": \"monolog.example\",\n  \"severity\": \"error\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fmonolog-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacbre%2Fmonolog-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fmonolog-python/lists"}