README.md in timber-2.0.7 vs README.md in timber-2.0.8
- old
+ new
@@ -13,14 +13,14 @@
## Overview
Timber for Ruby is an optional upgrade you can install for Ruby apps on the
[Timber.io logging platform](https://timber.io). Instead of completely replacing your log messages,
-Timber automatically augments your logs with JSON metadata. Essentially turning them into
+Timber efficiently augments your logs with critical metadata. Turning them into
[rich events with context](https://timber.io/docs/ruby/events-and-context). This preserves the
-readability of your logs while still dramatically improving the quality of your data.
-The end result: better logging and faster problem solving.
+readability of your logs while still adding the critical context needed to properly analyze your
+logs.
## How it works
For example, Timber turns this familiar raw text log:
@@ -59,25 +59,10 @@
2. In your `shell`, run `bundle install`
3. In your `shell`, run `bundle exec timber install`
-## Configuration
-
-All configuration options can be seen in the
-[`Timber::Config docs`](http://www.rubydoc.info/github/timberio/timber-ruby/Timber/Config).
-Here are a few popular options:
-
-1. `config.timber.format =`
-
- * `:default` - This is the default. It's the original, default, unchanged log messages.
-
- * `:lograge` - Works exactly like [lograge](https://github.com/roidrage/lograge), except Timber's
- additional context and metadata is also appended. Lograge++.
-
-
-
## Usage
<details><summary><strong>Basic logging</strong></summary><p>
Use `Logger` as normal:
@@ -86,23 +71,21 @@
logger.info("My log message")
# => My log message @metadata {"level": "info", "context": {...}}
```
-Timber will *never* deviate from the public `::Logger` interface in *any* way.
-
---
</p></details>
<details><summary><strong>Custom events</strong></summary><p>
Custom events allow you to extend beyond events already defined in
the [`Timber::Events`](lib/timber/events) namespace.
```ruby
-Logger.warn "Payment rejected", payment_rejected: {customer_id: "abcd1234", amount: 100, reason: "Card expired"}
+logger.warn "Payment rejected", payment_rejected: {customer_id: "abcd1234", amount: 100, reason: "Card expired"}
# => Payment rejected @metadata {"level": "warn", "event": {"payment_rejected": {"customer_id": "abcd1234", "amount": 100, "reason": "Card expired"}}, "context": {...}}
```
* Notice the `:payment_rejected` root key. Timber will classify this event as such.
@@ -118,10 +101,10 @@
Context is additional data shared across log lines. Think of it like log join data.
Custom contexts allow you to extend beyond contexts already defined in
the [`Timber::Contexts`](lib/timber/contexts) namespace.
```ruby
-Timber::CurrentContext.with({build: {version: "1.0.0"}}) do
+logger.with_context(build: {version: "1.0.0"}) do
logger.info("My log message")
end
# => My log message @metadata {"level": "info", "context": {"build": {"version": "1.0.0"}}}
```
\ No newline at end of file