papertrail-cli 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +19 -7
- data/bin/papertrail +6 -1
- data/lib/papertrail-cli.rb +1 -1
- data/papertrail-cli.gemspec +3 -3
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,23 +1,32 @@
|
|
1
1
|
# papertrail Command-line tail & search client for Papertrail log management service
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
Small standalone [binary] to retrieve, search, and tail recent app
|
4
|
+
server log and system syslog messages from [Papertrail].
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
Supports optional Boolean search queries and polling for new events
|
7
|
+
(like "tail -f"). Example:
|
8
|
+
|
9
|
+
papertrail -f "(www OR db) (nginx OR pgsql) -accepted"
|
10
|
+
|
11
|
+
Output is line-buffered so it can be fed into a pipe, like for grep.
|
12
|
+
|
13
|
+
The [SearchClient] class can be used by other apps to perform one-off
|
14
|
+
API searches or follow (tail) events matching a given query. Interface
|
15
|
+
may change.
|
8
16
|
|
9
17
|
|
10
18
|
## Installation
|
11
19
|
|
12
|
-
Install the gem, which includes a binary called "papertrail":
|
20
|
+
Install the gem ([RubyGems]), which includes a binary called "papertrail":
|
13
21
|
|
14
22
|
gem install papertrail-cli
|
15
23
|
|
16
24
|
|
17
25
|
## Configuration
|
18
26
|
|
19
|
-
Create ~/.papertrail.yml containing your credentials, or specify the
|
20
|
-
that file with -c. Example (from
|
27
|
+
Create ~/.papertrail.yml containing your credentials, or specify the
|
28
|
+
path to that file with -c. Example (from
|
29
|
+
examples/papertrail.yml.example):
|
21
30
|
username: your@account.com
|
22
31
|
password: yourpassword
|
23
32
|
|
@@ -63,4 +72,7 @@ Enhancement or fix:
|
|
63
72
|
to your enhancement.
|
64
73
|
4. Send a pull request.
|
65
74
|
|
75
|
+
[binary]: https://github.com/papertrail/papertrail-cli/blob/master/bin/papertrail
|
66
76
|
[Papertrail]: http://papertrailapp.com/
|
77
|
+
[SearchClient]: https://github.com/papertrail/papertrail-cli/blob/master/lib/papertrail/search_client.rb
|
78
|
+
[RubyGems]: https://rubygems.org/gems/papertrail-cli
|
data/bin/papertrail
CHANGED
@@ -54,7 +54,12 @@ class PapertrailSearch
|
|
54
54
|
|
55
55
|
def search_and_print(client)
|
56
56
|
events = client.search(ARGV[0])
|
57
|
-
|
57
|
+
return unless events
|
58
|
+
|
59
|
+
Papertrail::SearchClient.format_events(events) do |e|
|
60
|
+
puts e
|
61
|
+
$stdout.flush
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
def usage
|
data/lib/papertrail-cli.rb
CHANGED
data/papertrail-cli.gemspec
CHANGED
@@ -13,14 +13,14 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'papertrail-cli'
|
16
|
-
s.version = '0.1.
|
17
|
-
s.date = '2011-02-
|
16
|
+
s.version = '0.1.2'
|
17
|
+
s.date = '2011-02-09'
|
18
18
|
s.rubyforge_project = 'papertrail-cli'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
21
21
|
## as you like.
|
22
22
|
s.summary = "Command-line client for Papertrail hosted log management service."
|
23
|
-
s.description = "Command-line client for Papertrail hosted log management service. Tails and searches system
|
23
|
+
s.description = "Command-line client for Papertrail hosted log management service. Tails and searches app server logs and system syslog. Supports Boolean search and works with grep and pipe output (Unix)."
|
24
24
|
|
25
25
|
## List the primary authors. If there are a bunch of authors, it's probably
|
26
26
|
## better to set the email to an email list or something. If you don't have
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: papertrail-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Papertrail
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-09 00:00:00 -08:00
|
19
19
|
default_executable: papertrail
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
version: "0"
|
75
75
|
type: :runtime
|
76
76
|
version_requirements: *id004
|
77
|
-
description: Command-line client for Papertrail hosted log management service. Tails and searches system
|
77
|
+
description: Command-line client for Papertrail hosted log management service. Tails and searches app server logs and system syslog. Supports Boolean search and works with grep and pipe output (Unix).
|
78
78
|
email: troy@sevenscale.com
|
79
79
|
executables:
|
80
80
|
- papertrail
|