Sha256: 5647f0a99bed3f3db1388ac69e81f8d70b2cb33188a0dcb583ff4aba61efb964

Contents?: true

Size: 1.07 KB

Versions: 9

Compression:

Stored size: 1.07 KB

Contents

Logasm
================

## Usage

### Creating a new Logasm logger in Ruby

```ruby
Logasm.build(application_name, logger_config)
```

<b>application_name</b> is the name of the application. Only logstash logger will use this.

<b>logger_config</b> is a hash with logger types and their configuration.

#### Configuration

```
loggers:
  stdout:
    level: 'debug'
  logstash:
    level: 'info'
    host: 'localhost'
    port: 5228
```
Supported log levels:

1. fatal
2. error
3. warn
4. info
5. debug

For example level: 'warn' will log everything with warn and above.

#### Examples

Creating a new stdout logger

```ruby
require 'logasm'

logasm = Logasm.build('myApp', stdout: nil)
```

Creating a new logstash logger

```ruby
require 'logasm'

logasm = Logasm.build('myApp', logstash: { host: "localhost", port: 5228 })
```

Creating a new logger that logs into stdout and logstash at the same time

```ruby
require 'logasm'

logasm = Logasm.build('myApp', { stdout: nil, logstash: { host: "localhost", port: 5228 }})
```

When no loggers are specified, it creates a stdout logger by default.

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logasm-0.2.6 README.md
logasm-0.2.5 README.md
logasm-0.2.4 README.md
logasm-0.2.3 README.md
logasm-0.2.2 README.md
logasm-0.2.1 README.md
logasm-0.2.0 README.md
logasm-0.1.1 README.md
logasm-0.1.0 README.md