# BBC::Cosmos::Logger Logging helper gem for GELF & file logging on Cosmos ## Installation Add this line to your application's Gemfile: gem 'bbc-cosmos-logger' And then execute: $ bundle Or install it yourself as: $ gem install bbc-cosmos-logger ## Usage In your Ruby Cosmos Application: ```rb require 'bbc/cosmos/logger' ENV['APP_LOG_LOCATION'] = "/my/log/location.log" ENV['LOG_MAX_BACKUPS'] = 5 # How many backups to keep ENV['LOG_MAXTIME'] = 30 # Time in seconds to keep backups ENV['GELF_SERVER'] = 'gelf.logger.com' ENV['GELF_PORT'] = '12201' logger = BBC::Cosmos::Logger.create('my_stack_id') logger.warn "OMG ERRORZ" # Will log to your GELF server and to file ``` ## Contributing 1. Fork it ( http://github.com/bbc-news/bbc-cosmos-logger/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request