rails-log-viewer 0.0.1 → 0.1.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 +35 -10
- data/bin/read-log +8 -8
- data/lib/log/parser/version.rb +1 -1
- data/logstash.jpg +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 015081caae2bb08228b885ceb1f25a575a9aab45
|
4
|
+
data.tar.gz: 78a5dbdcf4a8b13cf4bcbb15624c57749d5e03c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e951eeedb486b34817730631bbafa8ae4d02b8b653789757a610278aab585794c028181d4dbe5d381dcd754cc6206eca034632401e34c0c88074bcb0bb505af
|
7
|
+
data.tar.gz: 9c1c12463a5e69222678b262867af9ae9b02c4689e00ed5061ba6b85524f7e27678d6b5ce92f193b3509ddbf9f968357546efa733b5fb24df99d46168b4b187b
|
data/README.md
CHANGED
@@ -1,24 +1,49 @@
|
|
1
|
-
# Log
|
1
|
+
# Rails Log viewer
|
2
2
|
|
3
|
-
|
3
|
+
With the help of logstash, elasticsearch, kibana and lograge, it is now realy easy to view log of a rails app locally.
|
4
4
|
|
5
|
-
|
5
|
+
This solution has the adventage that it doesn't require any remote server to run.
|
6
6
|
|
7
|
-
|
7
|
+
What it does is to fetch the remote logs to your locale machine and start logstash with kibana if needed
|
8
8
|
|
9
|
-
|
9
|
+
![Your awsome logs](https://raw.githubusercontent.com/collaide/rails-log-viewer/master/logstash.jpg)
|
10
10
|
|
11
|
-
|
11
|
+
## Installation
|
12
12
|
|
13
|
-
|
13
|
+
Install the gem:
|
14
14
|
|
15
|
-
|
15
|
+
$ gem install rails-log-viewer
|
16
|
+
|
17
|
+
Install logstash:
|
16
18
|
|
17
|
-
|
19
|
+
1. Download the latest logstash
|
20
|
+
2. uncompress the archive
|
18
21
|
|
19
22
|
## Usage
|
20
23
|
|
21
|
-
|
24
|
+
#### Configure
|
25
|
+
|
26
|
+
First, start to configure the gem, run:
|
27
|
+
|
28
|
+
$ fetch-log config
|
29
|
+
|
30
|
+
And provide the required informations. By now, you need to setup a ssh publickey to access to your remote machine. The password option is not working. Then, run:
|
31
|
+
|
32
|
+
$ read-log config
|
33
|
+
|
34
|
+
And provide your logstash executable (usually under: `logstash-1.x.x/bin/logstash`)
|
35
|
+
|
36
|
+
Now you can run logstash: ` read-log ` and then fetch the log: ` fetch-log `. Each times the logs has changed and you want to read it, run. ` fetch-log `.
|
37
|
+
|
38
|
+
Go to ` localhost:9292 ` to view your logs !
|
39
|
+
|
40
|
+
When you are done, run: ` read-log quit `
|
41
|
+
|
42
|
+
If you delete the log file to the server and want to parse it from the beginning, run: `read-log reset`
|
43
|
+
|
44
|
+
Every created files by this gem are under `$HOME/.log-parser`. Config files are .config for server access and .config-read for logstash executable
|
45
|
+
|
46
|
+
To configure lograge go to his github repo. Otherwise is a good idea to read the logstash doc!
|
22
47
|
|
23
48
|
## Contributing
|
24
49
|
|
data/bin/read-log
CHANGED
@@ -34,14 +34,14 @@ input {
|
|
34
34
|
filter {
|
35
35
|
if [fields][ip] {
|
36
36
|
geoip {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
source => "[@fields][ip]"
|
38
|
+
target => "geoip"
|
39
|
+
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
|
40
|
+
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
|
41
|
+
}
|
42
|
+
mutate {
|
43
|
+
convert => [ "[geoip][coordinates]", "float" ]
|
44
|
+
}
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
data/lib/log/parser/version.rb
CHANGED
data/logstash.jpg
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-log-viewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leo
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/log/parser.rb
|
89
89
|
- lib/log/parser/version.rb
|
90
90
|
- log-parser.gemspec
|
91
|
+
- logstash.jpg
|
91
92
|
- rails logs
|
92
93
|
homepage: ''
|
93
94
|
licenses:
|