{"id":13815318,"url":"https://github.com/djrobstep/logx","last_synced_at":"2025-04-13T00:36:57.118Z","repository":{"id":62576821,"uuid":"122955181","full_name":"djrobstep/logx","owner":"djrobstep","description":"best practice, zero config python logging","archived":false,"fork":false,"pushed_at":"2020-01-17T03:37:39.000Z","size":69,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T00:36:54.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djrobstep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-26T10:41:28.000Z","updated_at":"2023-11-09T18:10:52.000Z","dependencies_parsed_at":"2022-11-03T20:45:56.177Z","dependency_job_id":null,"html_url":"https://github.com/djrobstep/logx","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/djrobstep%2Flogx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djrobstep%2Flogx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djrobstep%2Flogx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djrobstep%2Flogx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djrobstep","download_url":"https://codeload.github.com/djrobstep/logx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650414,"owners_count":21139671,"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-08-04T04:03:19.302Z","updated_at":"2025-04-13T00:36:57.101Z","avatar_url":"https://github.com/djrobstep.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# logx: best practice python logging with zero config\n\nConfiguring logging is tedious. Reading the logging module docs makes me tired.\n\nWouldn't it be nice to log as easily as doing a print statement, without any upfront config?\n\n## Obligatory example\n\nEnter `logx`. It's as simple as:\n\n    \u003e\u003e\u003e from logx import log\n    \u003e\u003e\u003e log.info('hello world')\n    hello world\n    \u003e\u003e\u003e log.set_default_format()\n    \u003e\u003e\u003e log.warn('warning!')\n    [2018-02-26 21:51:16,971] WARNING [__main__.\u003cmodule\u003e:1] warning!\n\nLogs get logged automatically to the logger whose name matches the current module.\n\n## List of sweet features\n\n- Creates loggers lazily/as needed/on demand and **logs to the appropriate logger automatically**. If you're in the \"acme\" module it'll log to a log called \"acme\", no need worry about logger names and instances.\n- **Shows all log messages by default**, which follows the principle of least surprise and is probably what you want when debugging.\n- Included default handler **logs to the appropriate standard output stream by default**: Errors and warnings to stderr, the rest to stdout.\n- Allows easy following of best practice when including log statements in a library: **Just call log.create_null_handler() in your module.**\n- **Uses the standard logging library**, so you can still customize your setup as much as you want/need. Plays nicely with your existing logging config files.\n- **Includes the very useful logging_tree module** for viewing your current logging configuration. `logx.print_diagram()`\n\n## Install\n\n    \u003e\u003e\u003e pip install logx\n\n## Contribute\n\nIssues and pull requests welcome, hit me. Am I doing logging completely wrong? Critique welcome, even if very pedantic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjrobstep%2Flogx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjrobstep%2Flogx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjrobstep%2Flogx/lists"}