aws-logs 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/aws_logs/help/tail.md +1 -1
- data/lib/aws_logs/tail.rb +3 -6
- data/lib/aws_logs/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: dc241de69ed1390414efd6a39d3d97d341bbdcfbca2119cf98045c5abb268f35
|
4
|
+
data.tar.gz: 5f2ffe9ec6f6bea4a9626471c7b6acc58768e88b53adcf7ef3b3dcf28fb4b37b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3829280d3ea9e1f37f3c5cfabd1914cdecc9831989ca306699c1cb4cbcc9e5950a684661dea0bac3a674565766cd39c435cdc9a7e72c22bc096357ae11e99f0d
|
7
|
+
data.tar.gz: 5503713da8c2b5123254b5cce349684dfe8448a43fc94e90d372bde7a6ccd8791a33cb19f5f1187966421c3255560ee74547df6db51e9814ec819f23d3cf47e3
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.3.2]
|
7
|
+
- #1 clean up end_loop_signal logic
|
8
|
+
|
6
9
|
## [0.3.1]
|
7
10
|
- fix --no-follow option
|
8
11
|
|
data/lib/aws_logs/help/tail.md
CHANGED
@@ -52,6 +52,6 @@ To match terms with spaces in it, you'll need quotes around it. Otherise, the ma
|
|
52
52
|
|
53
53
|
aws-logs tail /aws/codebuild/demo --filter-pattern '"Wed Nov 27 23"' --since 3h --no-follow
|
54
54
|
|
55
|
-
Here's an example of matching with an exclude
|
55
|
+
Here's an example of matching with an exclude pattern using the `-` (minus sign).
|
56
56
|
|
57
57
|
aws-logs tail /aws/codebuild/demo --filter-pattern '"ERROR" - "Exiting"' --since 3h --no-follow
|
data/lib/aws_logs/tail.rb
CHANGED
@@ -41,7 +41,7 @@ module AwsLogs
|
|
41
41
|
display
|
42
42
|
since, now = now, current_now
|
43
43
|
loop_count!
|
44
|
-
sleep 5 if @follow &&
|
44
|
+
sleep 5 if @follow && !ENV["AWS_LOGS_TEST"]
|
45
45
|
end
|
46
46
|
# Refresh and display a final time in case the end_loop gets interrupted by stop_follow!
|
47
47
|
refresh_events(since, now)
|
@@ -100,9 +100,7 @@ module AwsLogs
|
|
100
100
|
return unless follow_until
|
101
101
|
|
102
102
|
messages = @events.map(&:message)
|
103
|
-
|
104
|
-
@@end_loop_signal = true
|
105
|
-
end
|
103
|
+
@@end_loop_signal = messages.detect { |m| m.include?(follow_until) }
|
106
104
|
end
|
107
105
|
|
108
106
|
def say(text)
|
@@ -113,15 +111,14 @@ module AwsLogs
|
|
113
111
|
@output.join("\n") + "\n"
|
114
112
|
end
|
115
113
|
|
116
|
-
@@end_loop_signal = false
|
117
114
|
def set_trap
|
118
115
|
Signal.trap("INT") {
|
119
116
|
puts "\nCtrl-C detected. Exiting..."
|
120
|
-
@@end_loop_signal = true # useful to control loop
|
121
117
|
exit # immediate exit
|
122
118
|
}
|
123
119
|
end
|
124
120
|
|
121
|
+
@@end_loop_signal = false
|
125
122
|
def self.stop_follow!
|
126
123
|
@@end_loop_signal = true
|
127
124
|
end
|
data/lib/aws_logs/version.rb
CHANGED