{"id":19008373,"url":"https://github.com/mechanicles/colorize_logs","last_synced_at":"2025-10-11T04:47:26.927Z","repository":{"id":215839779,"uuid":"695824669","full_name":"mechanicles/colorize_logs","owner":"mechanicles","description":"This gem simplifies and accelerates Rails application debugging by highlighting crucial information in the logs, making your debugging process faster and more effective.","archived":false,"fork":false,"pushed_at":"2023-09-27T03:54:03.000Z","size":22,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T06:55:14.866Z","etag":null,"topics":["colorize","colorize-logs","colorized","debugging","logs","rails","ruby","ruby-on-rails","tracing"],"latest_commit_sha":null,"homepage":"https://blog.mechanicles.com/2023/09/28/enhancing-development-efficiency-colorizing-rails-logs-for-rapid-debugging.html","language":"Ruby","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/mechanicles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-09-24T10:46:28.000Z","updated_at":"2025-06-24T04:30:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f18ad7ac-d115-4292-a35e-a494811070d5","html_url":"https://github.com/mechanicles/colorize_logs","commit_stats":null,"previous_names":["mechanicles/colorize_logs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mechanicles/colorize_logs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechanicles%2Fcolorize_logs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechanicles%2Fcolorize_logs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechanicles%2Fcolorize_logs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechanicles%2Fcolorize_logs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mechanicles","download_url":"https://codeload.github.com/mechanicles/colorize_logs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mechanicles%2Fcolorize_logs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005573,"owners_count":26083919,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["colorize","colorize-logs","colorized","debugging","logs","rails","ruby","ruby-on-rails","tracing"],"created_at":"2024-11-08T18:42:20.974Z","updated_at":"2025-10-11T04:47:26.897Z","avatar_url":"https://github.com/mechanicles.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ColorizeLogs\n\nAs developers, we often deal with current controller's action, its main view page and the layout associated with it. To\ntrace and debug these logs information, we check the logs through our console.\n\nHowever, by default, the logs are all in the same color, which makes it difficult to find the ones which we're working\non. To simplify our lives and speed up the debugging process, we want to assign different colors to these logs.\nThis will make it much easier for us to spot the right information and save time when we're fixing issues and improving\nour software.\n\nTo ease our development time, we can use this gem. It will colorize the logs for controller's action, view, layout,\nand etc.\n\n![colorize_logs](https://user-images.githubusercontent.com/77895/270565495-a75fc46d-b574-4fbe-9976-998abbf0b7b7.png)\n\n[![Build Status](https://github.com/mechanicles/colorize_logs/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/mechanicles/colorize_logs/actions)\n\n## Installation\n\nAdd this line to your application’s Gemfile:\n\n```ruby\ngem \"colorize_logs\"\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install colorize_logs\n\n## Usage\n\nCreate an initializer file `config/initializers/colorize_logs.rb` and add the following code:\n\n```ruby\n# frozen_string_literal: true\n\ncolorize_logs_formatter = ColorizeLogs::Formatter.new\n\ncolorize_logs_formatter.configure do\n  match(/Processing by/) do |msg|\n    msg.red\n  end\n\n  match(/Rendering layout/) do |msg|\n    msg.green\n  end\n\n  match(/Rendering.*within layouts/) do |msg|\n    msg.green\n  end\nend\n\n::Rails.logger.formatter = colorize_logs_formatter\n```\n\nThat's it. Restart your server and you should see the logs in different colors.\n\n\n## Credits\n\nThis gem is inspired by [Shog](https://github.com/phallguy/shog) gem. All the credits goes to the author of Shog gem.\nI had to create this one as original gem is not maintained anymore and I wanted minimal stuff from it.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can\nalso run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the \nversion number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, \npush git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/mechanicles/colorize_logs. This project is \nintended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the \n[code of conduct](https://github.com/mechanicles/colorize_logs/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechanicles%2Fcolorize_logs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmechanicles%2Fcolorize_logs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmechanicles%2Fcolorize_logs/lists"}