{"id":17396369,"url":"https://github.com/ibraheemdev/mongo_beautiful_logger","last_synced_at":"2025-04-15T15:34:22.498Z","repository":{"id":56884307,"uuid":"279165029","full_name":"ibraheemdev/mongo_beautiful_logger","owner":"ibraheemdev","description":"A simple and beautiful logger gem for MongoDB in you Ruby/Rails app.","archived":false,"fork":false,"pushed_at":"2023-07-01T00:22:22.000Z","size":16215,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:51:10.612Z","etag":null,"topics":["beautiful","logger","mongo","mongodb","mongoid","rails","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","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/ibraheemdev.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":"2020-07-12T23:25:38.000Z","updated_at":"2024-04-30T14:45:47.000Z","dependencies_parsed_at":"2024-11-15T05:40:53.998Z","dependency_job_id":null,"html_url":"https://github.com/ibraheemdev/mongo_beautiful_logger","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"bd5121cd0108568ba697d5ad3d6f4e275f5592f9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibraheemdev%2Fmongo_beautiful_logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibraheemdev%2Fmongo_beautiful_logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibraheemdev%2Fmongo_beautiful_logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibraheemdev%2Fmongo_beautiful_logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibraheemdev","download_url":"https://codeload.github.com/ibraheemdev/mongo_beautiful_logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249098613,"owners_count":21212528,"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":["beautiful","logger","mongo","mongodb","mongoid","rails","ruby","ruby-on-rails"],"created_at":"2024-10-16T12:57:28.951Z","updated_at":"2025-04-15T15:34:22.479Z","avatar_url":"https://github.com/ibraheemdev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mongo Beautiful Logger\n\n[![](https://img.shields.io/gem/dt/mongo_beautiful_logger?style=for-the-badge)](https://rubygems.org/gems/mongo_beautiful_logger)\n[![](https://img.shields.io/gem/v/mongo_beautiful_logger?style=for-the-badge)](https://rubygems.org/gems/mongo_beautiful_logger)\n[![](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](https://github.com/ibraheemdev/mongo_beautiful_logger/blob/master/LICENSE.txt)\n\nHave you ever started your rails console or log files and groaned when this is what you saw?\n\n\u003cimg src=\"./img/bad_logs.gif\" width=\"700\"\u003e\n\n\nMongo Beautiful Logger is simple and beautiful logging gem that converts *that*, into this:\n\n\u003cimg src=\"./img/beautiful_logs.gif\" width=\"700\"\u003e\n\nAmazing, right?\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mongo_beautiful_logger'\n```\n\nAnd then run:\n\n```bash\n$ bundle install\n```\n\nOr you can install it manually:\n\n```bash\n$ gem install mongo_beautiful_logger\n```\n\n## Usage\n\nTo set Mongo Beautiful Logger as the default logger for MongoDB, create a configuration file and add the following:\n```ruby\n# config/initializers/mongo_logger.rb\nrequire \"mongo_beautiful_logger\"\n\n# MongoDB Driver:\nMongo::Logger.logger = MongoBeautifulLogger.new($stdout)\n\n# Mongoid ODM:\nMongoid.logger = MongoBeautifulLogger.new($stdout)\n```\n\nThe `MongoidBeautifulLogger` class takes unlimited parameters which specify multiple output destinations. This can be used to output logs to a file as well as the console:\n```ruby\nMongoBeautifulLogger.new($stdout, 'log.txt')\n```\n\n## Behavior\n\nMongo Beautiful logger automatically colors all mongodb actions (find, update, insert, delete, aggregate, error, endsession, failure). It will also filter out the redundant messages regarding topology events, and server description changes. If there are any other actions that you would like to be customized, you can open a [github issue](https://github.com/ibraheemdev/mongo_beautiful_logger/issues/new) or submit a pull request. Contributions are greatly appreciated.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibraheemdev%2Fmongo_beautiful_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibraheemdev%2Fmongo_beautiful_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibraheemdev%2Fmongo_beautiful_logger/lists"}