{"id":38512906,"url":"https://github.com/jakob1379/sane-rich-logging","last_synced_at":"2026-01-17T06:24:04.648Z","repository":{"id":264157837,"uuid":"892536107","full_name":"jakob1379/sane-rich-logging","owner":"jakob1379","description":"One-liner for beautiul logs in python","archived":false,"fork":false,"pushed_at":"2025-12-29T19:57:10.000Z","size":116,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T02:20:49.697Z","etag":null,"topics":["logging","python","rich"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/sane-rich-logging/","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/jakob1379.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-22T09:51:21.000Z","updated_at":"2025-11-28T16:03:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"7185497d-3a75-4e75-8beb-62af7f8588e7","html_url":"https://github.com/jakob1379/sane-rich-logging","commit_stats":null,"previous_names":["jakob1379/sane-rich-logging"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jakob1379/sane-rich-logging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakob1379%2Fsane-rich-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakob1379%2Fsane-rich-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakob1379%2Fsane-rich-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakob1379%2Fsane-rich-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakob1379","download_url":"https://codeload.github.com/jakob1379/sane-rich-logging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakob1379%2Fsane-rich-logging/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["logging","python","rich"],"created_at":"2026-01-17T06:24:03.877Z","updated_at":"2026-01-17T06:24:04.634Z","avatar_url":"https://github.com/jakob1379.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 Sane Rich Logging - Sparkling Logging Made Simple! 🚀\n\nWelcome to **Sane Rich Logging**! ✨ A beautiful logging package that makes setting up robust and pretty logging in Python a breeze! With rich console output and flexible file handling, your logs will shine brighter than ever! ✨🔮\n\n## 🎉 Features\n\n- **Rich Logging Console Output** 🌈: Make your logs delightful with colorful, informative formatting.\n- **Rotating File Logs** 🗂️: Keep your logs neat and tidy with built-in rotation.\n- **Simple Integration** 🚀: Plug and play with minimal configuration.\n\n## 🚀 Installation\n\nUse your favorite tool to install the package\n\n```bash\npip install sane-rich-logging\npoetry install sane-rich-logging\nuv add sane-rich-logging\n```\n\n## 💡 Usage\n\nWith **Sane Rich Logging**, setting up logging is easy-peasy! 🍋 Here is how to use it:\n\n### Setting Up Logging\n\nJust import the package and call `setup_logging()` to configure your logger:\n\n```python\nfrom sane_rich_logging import setup_logging\n\nsetup_logging()\n\nlogging.debug(\"Use me like normally\")\n```\n\n### Sane Defaults for the Root Logger\n\nThis package provides a **sane default setup for the root logger**, which will propagate to other loggers that inherit from it. The usage of logging remains unchanged: simply use the **standard Python logging library** functions (`logging.debug()`, `logging.info()`, etc.). With **Sane Rich Logging**, you get a better experience with minimal effort—just set up the logger once, and enjoy consistent, clean logging throughout your application.\n\n### Configuration Options\n\n`setup_logging()` can be customized with arguments or environment variables:\n\n- **`log_file`** (`str | None`): The file path to store log outputs. You can provide it as an argument, or set the `LOG_FILE` environment variable. Defaults to `'application.log'` if none is provided.\n- **`log_level`** (`Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | None`): The log level for both console and file handlers. You can provide it as an argument, or set the `LOG_LEVEL` environment variable. Defaults to `'DEBUG'`.\n- **`log_max_size`** (`int | None`): The maximum size of the log file before rotation. You can provide it as an argument, or set the `LOG_MAX_SIZE` environment variable. Defaults to `5 MB`.\n\nThis flexibility makes it easy to adapt the logging setup to different environments, such as development, testing, or production.\n\n### Running the Example\n\nYou can also run the package directly to see the magic in action! 🌠\n\n```bash\npython -m sane_rich_logging\n```\n\n![Example Output](assets/example.png)\n\nThe **console output** is visually pleasing, providing clear and colorful messages for each log level, while the **written log** is saved in a detailed format for easier debugging and tracking:\n\n```\n2024-11-22 11:38:00,187 [DEBUG] [__main__.py:11] - This is a debug message.\n2024-11-22 11:38:00,190 [INFO] [__main__.py:12] - This is an info message.\n2024-11-22 11:38:00,191 [WARNING] [__main__.py:13] - This is a warning message.\n2024-11-22 11:38:00,192 [ERROR] [__main__.py:14] - This is an error message.\n2024-11-22 11:38:00,193 [CRITICAL] [__main__.py:15] - This is a critical message.\n```\n\n✨ It's that simple to make your logging glimmer with **Sane Rich Logging**! 🎇\n\n## ❤️ Contributions Welcome\n\nHave ideas or want to help make **Sane Rich Logging** even shinier? Feel free to submit an issue or pull request! Contributions are more than welcome! 🌟\n\n## 📄 License\n\nThis project is licensed under the MIT License. 📝\n\n---\n\nEnjoy logging, the **sparkling** way! 🪄✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakob1379%2Fsane-rich-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakob1379%2Fsane-rich-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakob1379%2Fsane-rich-logging/lists"}