flnt 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +18 -9
- data/lib/flnt/version.rb +1 -1
- data/lib/flnt.rb +4 -0
- data/spec/lib/flnt_spec.rb +5 -0
- metadata +2 -3
- data/lib/flnt/version_flymake.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f597c1c684124be6cbbc17b8b2fa388aa68ea6
|
4
|
+
data.tar.gz: 1f2b8774e99a066dcafd5032b1e0fd2d9447c109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd93d150a0e618ca658560ae9b98d13b5c58c345899dfbda1f2d3c590a223850ed613333c00aaf0bbc89c32af27fb520b0b5e1c9596f406d0edc552bcab637e
|
7
|
+
data.tar.gz: b3d4a5c6cd88a13509e93a8351d6393966cecced7b23016c9ee0b754500ad9baf2c0c796e13564f91b8c0fbecc1da799a6c58443fb1d8d8df8233e639b95add1
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
Gentle post-to-fluentd log solution.
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/flnt.png)](http://badge.fury.io/rb/flnt)
|
6
|
+
|
5
7
|
## Powered by wercker
|
6
8
|
|
7
9
|
[![wercker status](https://app.wercker.com/status/4c5b18d2fe3debeee48b7f0fab81eb12/m/ "wercker status")](https://app.wercker.com/project/bykey/4c5b18d2fe3debeee48b7f0fab81eb12)
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
gem 'flnt'
|
14
|
-
|
15
|
-
And then execute:
|
13
|
+
Usual Gemfile way:
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
```ruby
|
16
|
+
gem 'flnt'
|
17
|
+
```
|
20
18
|
|
21
|
-
|
19
|
+
```bash
|
20
|
+
$ bundle install
|
21
|
+
```
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -36,6 +36,15 @@ it emits the information to fluentd.
|
|
36
36
|
|
37
37
|
NOTE: You cannot use methods such as `foo?` or `foo!` for tag suffix. only `/[a-zA-Z0-9_]/` are OK.
|
38
38
|
|
39
|
+
### Force custome tag
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
Flnt.tag!("app.event.login.info").emit! "Logged in: #{current_user.name}"
|
43
|
+
```
|
44
|
+
|
45
|
+
`Flunt.tag!` initializes logger with a tag, and `Flnt::Logger#emit!` will just send a data to fluentd
|
46
|
+
without appending a tag suffix.
|
47
|
+
|
39
48
|
### Configuration of fluentd
|
40
49
|
|
41
50
|
```ruby
|
data/lib/flnt/version.rb
CHANGED
data/lib/flnt.rb
CHANGED
data/spec/lib/flnt_spec.rb
CHANGED
@@ -33,4 +33,9 @@ describe "Flnt" do
|
|
33
33
|
logger2 = Flnt.foo_tag
|
34
34
|
expect(logger1.__id__).not_to eq logger2.__id__
|
35
35
|
end
|
36
|
+
|
37
|
+
it "should create a new logger with custom tag" do
|
38
|
+
logger = Flnt.tag!("foo.bar.buz")
|
39
|
+
expect(logger.instance_eval { @tag }).to eq "foo.bar.buz"
|
40
|
+
end
|
36
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flnt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uchio KONDO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluent-logger
|
@@ -98,7 +98,6 @@ files:
|
|
98
98
|
- lib/flnt/configuration.rb
|
99
99
|
- lib/flnt/logger.rb
|
100
100
|
- lib/flnt/version.rb
|
101
|
-
- lib/flnt/version_flymake.rb
|
102
101
|
- spec/lib/flnt/configuration_spec.rb
|
103
102
|
- spec/lib/flnt/logger_spec.rb
|
104
103
|
- spec/lib/flnt_spec.rb
|
data/lib/flnt/version_flymake.rb
DELETED