README.md in timber-2.1.0.rc1 vs README.md in timber-2.1.0.rc2

- old
+ new

@@ -1,6 +1,6 @@ -# 🌲 Timber - Automatic Ruby Structured Logging +# 🌲 Timber - Simple Ruby Structured Logging [![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md) [![Build Status](https://travis-ci.org/timberio/timber-ruby.svg?branch=master)](https://travis-ci.org/timberio/timber-ruby) [![Build Status](https://travis-ci.org/timberio/timber-ruby.svg?branch=master)](https://travis-ci.org/timberio/timber-ruby) [![Code Climate](https://codeclimate.com/github/timberio/timber-ruby/badges/gpa.svg)](https://codeclimate.com/github/timberio/timber-ruby) @@ -22,14 +22,14 @@ 2. **Automatically structures yours logs.** - Third-party and in-app logs are all structured in a consistent format. See [how it works](#how-it-works) below. 3. **Seamlessly integrates with popular libraries and frameworks.** - Rails, Rack, Devise, - Omniauth, etc. [Automatically captures user context, HTTP context, and event data.](#third-party-support) + Omniauth, etc. [Automatically captures user context, HTTP context, and event data.](#third-party-integrations) -4. **Pairs with a modern console.** - Designed specifically for this librariy, instantly - usable, zero configuration. +4. **Pairs with a modern console.** - Designed specifically for this librariy, hosted, instantly + usable, zero configuration. [Checkout the docs](https://timber.io/docs/app/overview/). ## Installation 1. In `Gemfile`, add the `timber` gem: @@ -43,26 +43,26 @@ 3. In your `shell`, run `bundle exec timber install` ## How it works -Let's start with an example. Timber turns this familiar raw text log line: +Let's start with an example. Timber turns this: ``` Sent 200 in 45.2ms ``` Into a rich [`http_server_response` event](https://timber.io/docs/ruby/events-and-context/http-server-response-event/). ``` -Sent 200 in 45.2ms @metadata {"dt": "2017-02-02T01:33:21.154345Z", "level": "info", "context": {"user": {"id": 1, "name": "Ben Johnson"}, "http": {"method": "GET", "host": "timber.io", "path": "/path", "request_id": "abcd1234"}, "system": {"hostname": "1.server.com", "pid": "254354"}}, "event": {"http_server_response": {"status": 200, "time_ms": 45.2}}} +Sent 200 in 45.2ms @metadata {"dt": "2017-02-02T01:33:21.154345Z", "level": "info", "context": {"http": {"method": "GET", "path": "/path", "remote_addr": "192.32.23.12", "request_id": "abcd1234"}, "system": {"hostname": "1.server.com", "pid": "254354"}, "user": {"id": 1, "name": "Ben Johnson", "email": "bens@email.com"}}, "event": {"http_server_response": {"status": 200, "time_ms": 45.2}}} ``` Notice that instead of completely replacing your log messages, -Timber _augments_ your logs with structured metadata. Turning them into +Timber _augments_ your logs with structured metadata. Turning turns them into [rich events with context](https://timber.io/docs/ruby/events-and-context) without sacrificing -readability. +readability. And you have [complete control over which data is captured](#configuration). This is all accomplished by using the [Timber::Logger](http://www.rubydoc.info/github/timberio/timber-ruby/Timber/Logger): ```ruby @@ -75,24 +75,25 @@ ```json { "dt": "2017-02-02T01:33:21.154345Z", "level": "info", "context": { - "user": { - "id": 1, - "name": "Ben Johnson" - }, "http": { "method": "GET", - "host": "timber.io", "path": "/path", + "remote_addr": "192.32.23.12", "request_id": "abcd1234" }, "system": { "hostname": "1.server.com", "pid": "254354" - } + }, + "user": { + "id": 1, + "name": "Ben Johnson", + "email": "bens@email.com" + }, }, "event": { "http_server_response": { "status": 200, "time_ms": 45.2 @@ -116,11 +117,11 @@ 6. **Quickly find exceptions** - `is:exception` For a complete overview, see the [Timber for Ruby docs](https://timber.io/docs/ruby/overview/). -## Third-party support +## Third-party integrations 1. **Rails**: Structures ([HTTP requests](https://timber.io/docs/ruby/events-and-context/http-server-request-event/), [HTTP respones](https://timber.io/docs/ruby/events-and-context/http-server-response-event/), [controller calls](https://timber.io/docs/ruby/events-and-context/controller-call-event/), [template renders](https://timber.io/docs/ruby/events-and-context/template-render-event/), and [sql queries](https://timber.io/docs/ruby/events-and-context/sql-query-event/)). 2. **Rack**: Structures [exceptions](https://timber.io/docs/ruby/events-and-context/exception-event/), captures [HTTP context](https://timber.io/docs/ruby/events-and-context/http-context/), captures [user context](https://timber.io/docs/ruby/events-and-context/user-context/), captures [session context](https://timber.io/docs/ruby/events-and-context/session-context/). 3. **Devise, Omniauth, Clearance**: captures [user context](https://timber.io/docs/ruby/events-and-context/user-context/) 5. **Heroku**: Captures [release context](https://timber.io/docs/ruby/events-and-context/release-context/) via [Heroku dyno metadata](https://devcenter.heroku.com/articles/dyno-metadata). @@ -377,17 +378,18 @@ </p></details> <details><summary><strong>Capture release / deploy context</strong></summary><p> [Timber::Contexts::Release](http://www.rubydoc.info/github/timberio/timber-ruby/Timber/Contexts/Release) -tracks the current application release and version. If you are on Heroku, simply enable the -[dyno metadata](https://devcenter.heroku.com/articles/dyno-metadata) feature to get this -automatically. If you are not, simply add the follow environment variables to have the context -set automatically. +tracks the current application release and version. If you're on Heroku, simply enable the +[dyno metadata](https://devcenter.heroku.com/articles/dyno-metadata) feature. If you are not, +set the following environment variables and this context will be added automatically: -1. `RELEASE_COMMIT` - `2c3a0b24069af49b3de35b8e8c26765c1dba9ff0` -2. `RELEASE_CREATED_AT` - `2015-04-02T18:00:42Z` -3. `RELEASE_VERSION` - `v2.3.1` +1. `RELEASE_COMMIT` - Ex: `2c3a0b24069af49b3de35b8e8c26765c1dba9ff0` +2. `RELEASE_CREATED_AT` - Ex: `2015-04-02T18:00:42Z` +3. `RELEASE_VERSION` - Ex: `v2.3.1` + +All variables are optional, but at least one must be present. --- </p></details> \ No newline at end of file