auto_logger 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -2
- data/lib/auto_logger/named.rb +1 -1
- data/lib/auto_logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f11f1f0a46aa7904f73ef2bdcf084469426331d06f2555ed622e7007aafa32b
|
4
|
+
data.tar.gz: d9be3d2f7c7eaa750f13a0e840632f7f5109ad7aac35df9176612e12851086f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87ad0c3b8cea74dfab805284b9db36f1d37e1a2edb967036c35db27808cf6755b03601c1a995f8540bafb4385df26e669e5a58a1ed23dfdb93a5d61eebea910d
|
7
|
+
data.tar.gz: cdcc3a79b885747d58e9d618185439ba5cedaabbbb55ea230893e1c5bc9de6d4e19f46464a1b984ef349973d60098830eed25ee793dffaf71c2b185dc5e4bc24
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,8 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
## Usage
|
27
27
|
|
28
|
+
### Instance usage
|
29
|
+
|
28
30
|
```
|
29
31
|
class SomeService
|
30
32
|
include AutoLogger
|
@@ -35,6 +37,9 @@ class SomeService
|
|
35
37
|
end
|
36
38
|
```
|
37
39
|
|
40
|
+
|
41
|
+
### Grape example
|
42
|
+
|
38
43
|
Иногда необходимо насильно указать имя файла для лога. Например при подключении
|
39
44
|
в модули/класс без имени, в частности в grape-контролерах:
|
40
45
|
|
@@ -46,7 +51,7 @@ class PublicAPI::OrdersAPI < Grape::API
|
|
46
51
|
end
|
47
52
|
```
|
48
53
|
|
49
|
-
Usage in module context
|
54
|
+
## Usage in module context
|
50
55
|
|
51
56
|
```
|
52
57
|
module Custom
|
@@ -60,7 +65,7 @@ end
|
|
60
65
|
Custom.logger.info "Do.."
|
61
66
|
```
|
62
67
|
|
63
|
-
Setup custom logger
|
68
|
+
## Setup custom logger
|
64
69
|
|
65
70
|
```
|
66
71
|
AutoLogger.logger_builder = -> (tag, default_formatter) {
|
data/lib/auto_logger/named.rb
CHANGED
data/lib/auto_logger/version.rb
CHANGED