Sha256: 7ede21dca7825615b9cd4ef402bdbf13bc3d5c5a592ab14ab65a86ab9e911871

Contents?: true

Size: 1.53 KB

Versions: 9

Compression:

Stored size: 1.53 KB

Contents

# LogTribe [![Gem Version](https://badge.fury.io/rb/log_tribe.svg)](http://badge.fury.io/rb/log_tribe) [![Build Status](https://travis-ci.org/fenicks/log_tribe.svg?branch=master)](https://travis-ci.org/fenicks/log_tribe) [![Coverage Status](https://coveralls.io/repos/fenicks/log_tribe/badge.svg?branch=master&service=github)](https://coveralls.io/github/fenicks/log_tribe?branch=master)

Write logs messages to multiple destinations.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'log_tribe'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install log_tribe

## Usage

### Basic example

```ruby
log = LogTribe::Loggers.new([Logger.new(STDOUT), Fluent::Logger::FluentLogger.new(nil, host: 'srv', port: 10_010)],
                            { tag_name: 'app_name.app_type' })
log.info 'this log message is send to the 2 loggers passed in parameters'
log.debug 'debug message send too...'
log.close # Or not...
```

### Sinatra example

```ruby
# your_sinatra_app.rb
require 'log_tribe'
# ...
configure do
  # ...
  log_tribe = LogTribe::Loggers.new([Logger.new(STDOUT), 
                                     Fluent::Logger::FluentLogger.new(nil, host: 'srv', port: 10_010)])
  use Rack::CommonLogger, log_tribe
end
# ...
```

## Contributing

1. Fork it ( https://github.com/fenicks/log_tribe/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
log_tribe-0.5.1 README.md
log_tribe-0.5.0 README.md
log_tribe-0.3.1 README.md
log_tribe-0.3.0 README.md
log_tribe-0.2.10 README.md
log_tribe-0.2.9 README.md
log_tribe-0.2.8 README.md
log_tribe-0.2.7 README.md
log_tribe-0.2.6 README.md