Sha256: 8f8d2bb8a70f1b31adf11d524224621131c3345c472db79fc0d86e1cb21eb6af

Contents?: true

Size: 778 Bytes

Versions: 6

Compression:

Stored size: 778 Bytes

Contents

# sidekiq-gelf

Enables Sidekiq logging to a GELF-supported server, such as Graylog2.

## Usage

This will inject the logger as middleware into the Sidekiq server. Add it inside of your `Sidekiq.configure_server` block.

``` ruby
Sidekiq.configure_server do |config|
  # Adds the GELF logger as middleware in Sidekiq in order
  # to include important logging information.
  # These arguments are passed through to gelf-rb.
  Sidekiq::Logging::GELF.hook!('127.0.0.1', 12201, 'LAN', facility: "my-application")
end
```

**Note:** by default, normal logging is left as-is. If you wish to log only to the GELF input, you can do:

``` ruby
Sidekiq.configure_server do |config|
  config.server_middleware do |chain|
    chain.remove Sidekiq::Middleware::Server::Logging
  end
end
```

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq-gelf-1.3.0 README.md
sidekiq-gelf-1.2.0 README.md
sidekiq-gelf-1.1.0 README.md
sidekiq-gelf-1.0.3 README.md
sidekiq-gelf-1.0.2 README.md
sidekiq-gelf-1.0.1 README.md