README.md in logdna-1.3.0 vs README.md in logdna-1.4.0

- old
+ new

@@ -79,11 +79,10 @@ Clear current metadata, level, appname, environment logger.clear Check current log level: - logger.info? => true logger.warn? => false Log a message with a particular level easily @@ -92,15 +91,23 @@ logger.debug { 'This is a debug message' } Hostname and app name cannot be more than 80 characters. +### Rails Setup +In your `config/environments/environment.rb`: + ``` + Rails.application.configure do + config.logger = Logdna::Ruby.new(your_api_key, options) + end + ``` + # Important Notes 1. This logger assumes that you pass in json formatted data -2. This logger is a singleton (do not create mutiple instances of the logger) even though the singleton structure is not strongly enforced. +2. This logger is a singleton (do not create mutiple instances of the logger) even though the singleton structure is not strongly enforced. # API ## Logdna::Ruby.new(ingestion_key, options = {}) @@ -117,10 +124,10 @@ |{ :meta => metadata} | Nil | |{ :endpoint => LogDNA Ingestion URI | 'https://logs.logdna.com/logs/ingest' | |{ :flushtime => Log flush interval in seconds } | 0.25 seconds | |{ :flushbyte => Log flush upper limit in bytes } | 500000 bytes ~= 0.5 megabytes | -Different log level displays log messages in different colors as well. +Different log level displays log messages in different colors as well. - ![TRACE DEBUG INFO Colors](https://placehold.it/15/515151/000000?text=+) "Trace" "Debug" "Info" - ![WARN Color](https://placehold.it/15/ec9563/000000?text=+) "Warn" - ![ERROR Fatal Colors](https://placehold.it/15/e37e7d/000000?text=+) "Error" "Fatal"