No commit activity in last 3 years
No release in over 3 years
Sometimes we need to log things on some different places other than the default logger place
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 10.0
~> 3.0
 Project Readme

CustomLogGenerator

Sometimes, I want more logs to show me the process or some important informations generated by our application. I tried to use default Logger to generate logs in default Rails logs. Then, you would be tired of finding your log in the massive default log file Even though you can use tools like Logentries, but you may still think it's not convinent. B/C we may want to report the logs to someone by email. If you're suffering from what I said above, I think "custom_log_generator" is the gem you want. You can define as many log files as you like in config file. Then, for each file it will generate a custom logger for you. For details, please refer to #usage part.

Installation

This gem can only be used by combining with Rails project.

Add this line to your application's Gemfile:

gem 'custom_log_generator'

And then execute:

$ bundle

Usage

After you finished the installation by bundle. You need to run:

$ rake custom_log:install

After doing this, you will get two file:

  • config/custom_logs.yml
  • config/initializers/generate_custom_logger.rb

Then, you need to declare the logs you want in the config file "custom_logs.yml"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/custom_log_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the CustomLogGenerator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.