custom_log_generator 0.1.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -7
- data/lib/config/custom_logs.yml +5 -0
- data/lib/custom_log_generator/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: 3d9c4ab8f8d586302435b54fa779e82ed367b613e88323c64d8aa711fe947527
|
4
|
+
data.tar.gz: 5d93a1824d6176cd87e4c46d0be78250f4523ce3af9bc85f0a89b726386b0d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a16e872438c000add76a07f187d5a9925078150c9a8da06ab54a8994429f74b2eeab751edb0c1d150f7e61d7bc5cd4eb99a529c22f6a355f6af4762e0b3d2878
|
7
|
+
data.tar.gz: f9990a13f9b94244df63d571f8802b0433634787139e165b3ca7618ada67968205a0f33914e5a76a05bee9437cd46470978832d09992cb7d2a8abce66e6de02b
|
data/README.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# CustomLogGenerator
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Sometimes, I want more logs to show me the process or some important informations generated by our application.
|
4
|
+
I tried to use default Logger to generate logs in default Rails logs. Then, you would be tired of finding your log in the massive default log file
|
5
|
+
Even though you can use tools like Logentries, but you may still think it's not convinent. B/C we may want to report the logs to someone by email.
|
6
|
+
If you're suffering from what I said above, I think "custom_log_generator" is the gem you want. You can define as many log files as you like in config file.
|
7
|
+
Then, for each file it will generate a custom logger for you. For details, please refer to #usage part.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
11
|
+
>This gem can only be used by combining with Rails project.
|
12
|
+
|
9
13
|
Add this line to your application's Gemfile:
|
10
14
|
|
11
15
|
```ruby
|
@@ -16,13 +20,19 @@ And then execute:
|
|
16
20
|
|
17
21
|
$ bundle
|
18
22
|
|
19
|
-
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
After you finished the installation by bundle.
|
26
|
+
You need to run:
|
20
27
|
|
21
|
-
$
|
28
|
+
$ rake custom_log:install
|
22
29
|
|
23
|
-
|
30
|
+
After doing this, you will get two file:
|
31
|
+
|
32
|
+
- config/custom_logs.yml
|
33
|
+
- config/initializers/generate_custom_logger.rb
|
24
34
|
|
25
|
-
|
35
|
+
Then, you need to declare the logs you want in the config file "custom_logs.yml"
|
26
36
|
|
27
37
|
## Development
|
28
38
|
|
data/lib/config/custom_logs.yml
CHANGED