Skip to content

Commit

Permalink
Convert rdoc to markdown for syntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryo Nakamura committed Nov 11, 2013
1 parent 9801fde commit fd59251
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 57 deletions.
63 changes: 63 additions & 0 deletions README.md
@@ -0,0 +1,63 @@
# Fluent logger
A structured event loger

## Examples

### Simple

```ruby
require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new(nil, :host=>'localhost', :port=>24224)
unless log.post("myapp.access", {"agent"=>"foo"})
p log.last_error # You can get last error object via last_error method
end

# output: myapp.access {"agent":"foo"}
```

### Singleton
```ruby
require 'fluent-logger'

Fluent::Logger::FluentLogger.open(nil, :host=>'localhost', :port=>24224)
Fluent::Logger.post("myapp.access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}
```

### Tag prefix
```ruby
require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new('myapp', :host=>'localhost', :port=>24224)
log.post("access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}
```

## Loggers

### Fluent
```ruby
Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=24224)
```

### Console
```ruby
Fluent::Logger::ConsoleLogger.open(io)
```

### Null
```ruby
Fluent::Logger::NullLogger.open
```

|name|description|
|---|---|
|Web site|http://fluent.github.com/|
|Documents|http://fluent.github.com/doc/|
|Source repository|https://github.com/fluent/fluent-logger-ruby|
|Author|Sadayuki Furuhashi|
|Copyright|(c) 2011 FURUHASHI Sadayuki|
|License|Apache License, Version 2.0|
57 changes: 0 additions & 57 deletions README.rdoc

This file was deleted.

0 comments on commit fd59251

Please sign in to comment.