{"id":28385230,"url":"https://github.com/nlpoptimize/rainbow_logging","last_synced_at":"2025-06-26T06:32:34.038Z","repository":{"id":287062315,"uuid":"963431021","full_name":"NLPOptimize/rainbow_logging","owner":"NLPOptimize","description":"🌈 A flexible and minimal Python logging utility that adds colorful, readable log output to your terminal.","archived":false,"fork":false,"pushed_at":"2025-04-09T18:58:43.000Z","size":352,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T11:53:46.051Z","etag":null,"topics":["colors","logger","logging","python","python3"],"latest_commit_sha":null,"homepage":"","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/NLPOptimize.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-09T17:09:48.000Z","updated_at":"2025-04-09T20:28:03.000Z","dependencies_parsed_at":"2025-04-09T19:40:49.279Z","dependency_job_id":"eda7f319-ac5e-4d6a-9eb0-ad86cfdd6b51","html_url":"https://github.com/NLPOptimize/rainbow_logging","commit_stats":null,"previous_names":["nlpoptimize/rainbow_logging"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NLPOptimize/rainbow_logging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLPOptimize%2Frainbow_logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLPOptimize%2Frainbow_logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLPOptimize%2Frainbow_logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLPOptimize%2Frainbow_logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NLPOptimize","download_url":"https://codeload.github.com/NLPOptimize/rainbow_logging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLPOptimize%2Frainbow_logging/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262014895,"owners_count":23245222,"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":["colors","logger","logging","python","python3"],"created_at":"2025-05-30T10:11:33.937Z","updated_at":"2025-06-26T06:32:34.030Z","avatar_url":"https://github.com/NLPOptimize.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://capsule-render.vercel.app/api?type=waving\u0026height=200\u0026color=gradient\u0026text=rainbow_logging\u0026animation=fadeIn)\n\n🌈 A flexible and minimal Python logging utility that adds colorful, readable log output to your terminal.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"128\" height=\"128\" src=\"assets/rainbow_logging.png\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\npip install rainbow_logging\n```\n\n## Usage\n\nTo import both the rainbow_logging and the basic logging module, you can use the following import statements:\n\n```python\nfrom rainbow_logging import LoggingConfig, Timezone, verify\nimport logging\n```\n\nLoggingConfig is a class that configures how logging output will be displayed.\nIt can be used as shown below:\n\n```python\nLoggingConfig.set_level(LoggingConfig.DEBUG).thread_name(True).traceback(False).asctime(True).finish(Timezone.Asia.Seoul)\n```\n\n* `LoggingConfig`\n    * `levelname`: If set to True, the logging level will be displayed. If False, it will be omitted.\n    * `asctime`: If set to True, timestamp information will be included. If False, it will be omitted.\n    * `thread_name`: If set to True, it will display each thread individually in a multi-threaded environment. If False, output will be the same across threads.\n    * `set_level`: Determines from which level logs will be displayed. The following values can be used: `LoggingConfig.DEBUG`, `LoggingConfig.INFO`, `LoggingInfo.WARNING`, `LoggingInfo.ERROR`, `LoggingInfo.CRITICAL`\n    * `traceback`: If True, traceback information will be displayed when a CRITICAL level log occurs.\n    * `save_file`: If a filename is provided, logs will be saved to the file in addition to being output to stdout.\n    * `finish`: Takes a Timezone as an argument and completes all configurations. (This must be called at the end for all settings to be applied.)\n\n* `Timezone`\n    * This class is used as an argument for LoggingConfig, for example: `Timezone.America.Cambridge_Bay`\n\n### Example\n\n```python\nfrom rainbow_logging import LoggingConfig, Timezone, verify\nimport logging\n\nif __name__ == '__main__':\n    LoggingConfig.set_level(LoggingConfig.DEBUG).thread_name(True).traceback(False).asctime(True).finish(Timezone.Asia.Seoul)\n    logging.debug('This message is a log message.')\n    logging.info('This message is a log message.')\n    logging.warning('This message is a log message.')\n    logging.error('This message is a log message.')\n    logging.critical('This message is a log message.')\n\n    verify(\"1 \u003e 2\")\n```\n![](https://capsule-render.vercel.app/api?type=waving\u0026height=200\u0026color=gradient\u0026text=rainbow_logging\u0026animation=fadeIn\u0026section=footer)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlpoptimize%2Frainbow_logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlpoptimize%2Frainbow_logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlpoptimize%2Frainbow_logging/lists"}