Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Mar 10, 2017
1 parent 0a92bb1 commit e902787
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions README.md
@@ -1,7 +1,7 @@
# 🌲 Timber - Master your Ruby apps with structured logging

<p align="center" style="background: #140f2a;">
<a href="http://files.timber.io/images/readme-interface.gif"><img src="http://files.timber.io/images/readme-interface.gif" width="100%" /></a>
<a href="http://files.timber.io/images/readme-interface-5.gif"><img src="http://files.timber.io/images/readme-interface-5.gif" width="100%" /></a>
</p>

[![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md)
Expand All @@ -10,10 +10,40 @@
[![Code Climate](https://codeclimate.com/github/timberio/timber-ruby/badges/gpa.svg)](https://codeclimate.com/github/timberio/timber-ruby)
[![View docs](https://img.shields.io/badge/docs-viewdocs-blue.svg?style=flat-square "Viewdocs")](http://www.rubydoc.info/github/timberio/timber-ruby)

Still logging raw text? Timber is a complete *structured* logging solution that you can setup in
minutes. It solves logging so you don't have to!
* [Timber website](https://timber.io)
* [Library documentation](https://hex.pm/packages/timber)
* [Support](mailto:support@timber.io)

To learn more, checkout out [timber.io](https://timber.io).
## Overview

Timber is structured logging solution, giving you _complete_ insight into your applications
without the need for agents, or special APIs. It's just better logging, like it always
should have been. 😄

Timber works by automatically by turning your raw text logs into rich structured events. It
pairs with the [Timber Console](https://app.timber.io) to maximize your productivity, allowing
you to _quickly_ find what you need so that you get back to focusing on your core competencies.
Never feel lost again, _always_ have the data you need.

To provide an example, Timber turns this:

```
Sent 200 in 45.ms
```

Into this:

```
Sent 200 in 45.2ms @metadata {"dt": "2017-02-02T01:33:21.154345Z", "level": "info", "context": {"user": {"id": 1}, "http": {"method": "GET", "host": "timber.io", "path": "/path"}}, "event": {"http_response": {"status": 200, "time_ms": 45.2}}}
```

Allowing you to run queries like:

1. `context.request_id:abcd1234` - View all logs generated for a specific request.
2. `context.user.id:1` - View logs generated by a specific user.
3. `type:exception` - View all exceptions with the ability to zoom out and view them in context (request, user, etc).
4. `http_server_response.time_ms:>=1000` - View slow responses with the ability to zoom out and view them in context (request, user, etc).
5. `level:error` - Levels in your logs, imagine that!


## Installation
Expand All @@ -31,8 +61,9 @@ To learn more, checkout out [timber.io](https://timber.io).
```ruby
# config/environments/production.rb

# config.log_formatter = ::Logger::Formatter.new # <--------------------------- REMOVE ME
# config.logger = ActiveSupport::TaggedLogging.new(logger) # <----------------- REMOVE ME
# Remove *any* existing `config.logger =` and `config.log_formatter` calls!
# config.log_formatter = ... # <--------------------------------- REMOVE ME
# config.logger = ... # <---------------------------------------- REMOVE ME

config.logger = ActiveSupport::TaggedLogging.new(Timber::Logger.new(STDOUT)) # <-- ADD ME
```
Expand Down

0 comments on commit e902787

Please sign in to comment.