rails-log-viewer 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f71d55ec4d0b129b9518234958e3f60529331578
4
- data.tar.gz: 75d1e75904723e63cbe5d64a45f7f0eff4d0906c
3
+ metadata.gz: 015081caae2bb08228b885ceb1f25a575a9aab45
4
+ data.tar.gz: 78a5dbdcf4a8b13cf4bcbb15624c57749d5e03c0
5
5
  SHA512:
6
- metadata.gz: 4f42bf40d716406ffbdfd67bd85f64a5bf2da524b61bd722e5951404df5308dc1336b27358d38b777e2fab78c14ed782a8bcd3b36c44c3be153eacb504d77bff
7
- data.tar.gz: e179836cde88125f870083d5fd74137218863cabe450fe05ef881f85280c2045a8dc48396bb04e9462347e8a6651f367bc8bbc2fd57926aab7f7c6929a688754
6
+ metadata.gz: 2e951eeedb486b34817730631bbafa8ae4d02b8b653789757a610278aab585794c028181d4dbe5d381dcd754cc6206eca034632401e34c0c88074bcb0bb505af
7
+ data.tar.gz: 9c1c12463a5e69222678b262867af9ae9b02c4689e00ed5061ba6b85524f7e27678d6b5ce92f193b3509ddbf9f968357546efa733b5fb24df99d46168b4b187b
data/README.md CHANGED
@@ -1,24 +1,49 @@
1
- # Log::Parser
1
+ # Rails Log viewer
2
2
 
3
- TODO: Write a gem description
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
- ## Installation
5
+ This solution has the adventage that it doesn't require any remote server to run.
6
6
 
7
- Add this line to your application's Gemfile:
7
+ What it does is to fetch the remote logs to your locale machine and start logstash with kibana if needed
8
8
 
9
- gem 'log-parser'
9
+ ![Your awsome logs](https://raw.githubusercontent.com/collaide/rails-log-viewer/master/logstash.jpg)
10
10
 
11
- And then execute:
11
+ ## Installation
12
12
 
13
- $ bundle
13
+ Install the gem:
14
14
 
15
- Or install it yourself as:
15
+ $ gem install rails-log-viewer
16
+
17
+ Install logstash:
16
18
 
17
- $ gem install log-parser
19
+ 1. Download the latest logstash
20
+ 2. uncompress the archive
18
21
 
19
22
  ## Usage
20
23
 
21
- TODO: Write usage instructions here
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
 
@@ -34,14 +34,14 @@ input {
34
34
  filter {
35
35
  if [fields][ip] {
36
36
  geoip {
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
- }
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
 
@@ -1,5 +1,5 @@
1
1
  module Log
2
2
  module Parser
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
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.1
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: