Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zarqman/mongo_logs_on_roids
Add color, DB time (Rails), etc to your mongo logs. Requires just mongo gem; compatible with Mongoid 5-7+, Rails, etc.
https://github.com/zarqman/mongo_logs_on_roids
mongo-logs mongo-ruby mongodb mongoid mongoid-plugin rails
Last synced: 2 days ago
JSON representation
Add color, DB time (Rails), etc to your mongo logs. Requires just mongo gem; compatible with Mongoid 5-7+, Rails, etc.
- Host: GitHub
- URL: https://github.com/zarqman/mongo_logs_on_roids
- Owner: zarqman
- License: mit
- Created: 2015-12-09T17:00:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-16T17:41:24.000Z (almost 4 years ago)
- Last Synced: 2024-10-08T16:09:00.795Z (about 1 month ago)
- Topics: mongo-logs, mongo-ruby, mongodb, mongoid, mongoid-plugin, rails
- Language: Ruby
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MongoLogsOnRoids
Better logging for mongodb on Ruby.
Compatible with just the `mongo` gem (v2.1+). Auto-detects Mongoid 5-7 and Rails and enables appropriate features.
Makes mongo logs more awesome with:
* Colorized logging
* Calculating and displaying total time in mongo (Rails):
`Completed 200 OK in 13ms (Views: 0.2ms | Mongo: 3.2ms)`## Installation
Install like any other gem. Add to your Gemfile:
```ruby
gem 'mongo_logs_on_roids'
```## Usage
Under normal circumstances, should activate itself automatically.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/zarqman/mongo_logs_on_roids.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Inspired by [mongoid_colored_logger](https://github.com/romanbsd/mongoid_colored_logger), by Roman Shterenzon (thanks!).