Table of Contents
- Code of Conduct
This gem has been deprecated and will be completely removed on 1, 1, 2018. For UNIX based machines please use newsyslog instead. It is a superior implementation which also reduces the cost of installing another gem for your app. To read more about newsyslog and how to configure your machine with it please read this OSX section for details.
- Provides customization of default settings.
- Prefixes log output with timestamps and remote IP addresses.
- Configures max log size to 1MB for local environments (i.e. test and development).
- Configures max log size to 5MB with log rotation (7 files max) for remote environments (i.e. review, stage, production, etc).
For a secure install, type the following from the command line (recommended):
gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem) gem install log_plus --trust-policy MediumSecurity
NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification while allowing the installation of unsigned dependencies since they are beyond the scope of this gem.
For an insecure install, type the following (not recommended):
gem install log_plus
Add the following to your Gemfile:
Within your application or environment *.rb files, you can configure any of the following settings:
- Log+ Settings:
- config.log_plus_settings[:max_size] = Optional. Sets max log size (local environments only). Default: 1MB.
- Rails Settings:
- config.log_tags = Optional. Defines log output (all environments). Default: Timestamp and remote IP prefixes.
- config.logger = Optional. Configures the Rails logger (all environments). Default: Logger.new (with 5MB max size and 7 files max rotation).
To test, run:
bundle exec rake
Read Semantic Versioning for details. Briefly, it means:
- Patch (x.y.Z) - Incremented for small, backwards compatible bug fixes.
- Minor (x.Y.z) - Incremented for new, backwards compatible public API enhancements and/or bug fixes.
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
Code of Conduct
Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.
Read CONTRIBUTING for details.