README.md in timber-2.1.0.rc4 vs README.md in timber-2.1.0.rc5
- old
+ new
@@ -57,11 +57,11 @@
```
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": "df88dbaa-50fd-4178-85d7-d66279ea33b6"}, "session": {"id": "bfa8242cd9733bf0211e334be203f0d0"}, "system": {"hostname": "my.host.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 turns them into
+Timber _augments_ your logs with structured metadata. Turning them into
[rich events with context](https://timber.io/docs/ruby/events-and-context) without sacrificing
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):
@@ -211,10 +211,16 @@
logger.info("Processed background job", background_job: {time_ms: timer})
# => Processed background job in 54.2ms @metadata {"level": "info", "event": {"background_job": {"time_ms": 54.2}}}
```
-Or capture any metric you want:
+And of course, `time_ms` can also take a `Float`:
+
+```ruby
+logger.info("Processed background job", background_job: {time_ms: 45.6})
+```
+
+Lastly, metrics aren't limited to timings. You can capture any metric you want:
```ruby
logger = Timber::Logger.new(STDOUT)
logger.info("Credit card charged", credit_card_charge: {amount: 123.23})
\ No newline at end of file