{"id":19374767,"url":"https://github.com/leksus-04/cool-logs","last_synced_at":"2026-06-17T11:32:10.899Z","repository":{"id":62564738,"uuid":"383897208","full_name":"LeKSuS-04/cool-logs","owner":"LeKSuS-04","description":"🌳 Light output beautifier for python 3","archived":false,"fork":false,"pushed_at":"2022-04-24T07:44:47.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T03:12:38.426Z","etag":null,"topics":["beautifier","logging","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeKSuS-04.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":"2021-07-07T18:53:32.000Z","updated_at":"2022-07-05T09:08:39.000Z","dependencies_parsed_at":"2022-11-03T16:45:29.739Z","dependency_job_id":null,"html_url":"https://github.com/LeKSuS-04/cool-logs","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/LeKSuS-04%2Fcool-logs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2Fcool-logs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2Fcool-logs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2Fcool-logs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeKSuS-04","download_url":"https://codeload.github.com/LeKSuS-04/cool-logs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240502439,"owners_count":19811803,"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":["beautifier","logging","python"],"created_at":"2024-11-10T08:36:05.266Z","updated_at":"2026-06-17T11:32:10.850Z","avatar_url":"https://github.com/LeKSuS-04.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cool logs\n Simple output beautifier for python 3\n\n## Installation\nYou can install this package using `pip`:\n```\npip install coollogs\n```\n\n## Basic usage\nTo use coollogs, you need to import `log` object from this module: \n```\nfrom coollogs import log\nlog.success('Hello, logs!')\n```  \nThe output will be as follows:  \n![Examples](screenshots/basic_usage_output.png)\n\n## Logging modes\nWhen logging, each message will be prefixed with current time (hh:mm:ss) and\nit's type. There are 10 built-in logging modes:\n* Critical - for VERY important messages (red background)\n* Error - for errors and stuff (red foreground)\n* Warning - you guessed it: for warnings (orange foreground)\n* Info - for defaulft logging (cyan foreground)\n* Debug - for debugging purposes (purple foreground)\n* Plus - when you discovered something new (green foreground)\n* Minus - when you lose something important (red foreground)\n* Success - for bragging about the success (green foreground)  \n* Failure - to get upset about the failure  (red foreground)  \n* Custom - Set it how you like (custom type and color, explained later)  \n\nThis is how it looks on my system:\n![Examples](screenshots/logs_example.png)\n\n## Advanced: Logger object\nWhen creating logger object you can pass 3 different parameters to constructor:\n```\nlog = coollogs.Logger(colorful=True, infolength=9, \n                      timecolor=coollogs.Colors.fg.CYAN)\n```\n| Parameter  |       Type      | Purpose                                                                                                                                             | Default value           |\n|------------|:---------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------:|\n|  colorful  |       bool      | Turns on/off color stylizing of the output                                                                                                          |           True          |\n|  loglevel  |       int       | Sets log level for the logger                                                                                                                       |            31           |\n|  labelsize |       int       | Determines amount of space for label block.  If information is longer than *labelsize*, it'll be cut; otherwise it'll be padded with spaces.        |            9            |\n|  timecolor | coollogs.Colors | Sets color for time                                                                                                                                 | coollogs.Colors.fg.CYAN |\n\n## Advanced: Custom logs\nIf provided log modes don't satisfy you, you can create your own, using .custom():\n```\nlog.custom('Hello, custom!', infoname='', infocolor=Colors.fg.CYAN)\n```\n| Parameter |       Type      | Purpose                                                                                                         | Default value           |\n|-----------|:---------------:|-----------------------------------------------------------------------------------------------------------------|:-----------------------:|\n|  infoname |       str       | Sets text in custom information block                                                                           |            \"\"           |\n| labelcolor| coollogs.Colors | Sets color of custom information block. Can be a sum of different coollogs.Colors values to create mixed styles | coollogs.Colors.fg.CYAN |\n\n## Advanced: Logging level\nEven though there are 10 built-in logging modes, only 5 of them are \"basic\": debug, info, warning, error and critical. You can set logging level by using .set_level(int) on your logger object, for example:\n```\nlog.set_level(7)\n```\nThis will set logging level to a 7, which means that only critical messages, errors and warnings will be displayed. THe value passed into set_level() function is calulated by summing up every log level, which you want to be showed.\nValues for each level are as follows:\n| Level    | Value |\n|----------|:-----:|\n| CRITICAL |   1   |\n|   ERROR  |   2   |\n|  WARNING |   4   |\n|   INFO   |   8   |\n|   DEBUG  |   16  |\n\nSo, for example, to show everything except debug messages, you have to set logging level to 1 + 2 + 4 + 8 = 15.  \nYou don't have to memorize all the values, there are constants in log_level class to help you with it:\n```\ncoollogs.log_level.CRITICAL = 1\ncoollogs.log_level.ERROR    = 2\ncoollogs.log_level.WARNING  = 4\ncoollogs.log_level.INFO     = 8\ncoollogs.log_level.DEBUG    = 16\ncoollogs.log_level.ALL      = 31 ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleksus-04%2Fcool-logs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleksus-04%2Fcool-logs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleksus-04%2Fcool-logs/lists"}