remote_syslog 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -1
- data/lib/remote_syslog.rb +1 -1
- data/lib/remote_syslog/cli.rb +5 -5
- data/lib/remote_syslog/reader.rb +5 -3
- data/remote_syslog.gemspec +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -49,8 +49,8 @@ specified as arguments to the remote_syslog daemon. More below.
|
|
49
49
|
--pid-file FILENAME PID filename (<program name>.pid)
|
50
50
|
--parse-syslog Parse file as syslog-formatted file
|
51
51
|
-s, --severity SEVERITY Severity (notice)
|
52
|
-
--tls Connect via TCP with TLS
|
53
52
|
--strip-color Strip color codes
|
53
|
+
--tls Connect via TCP with TLS
|
54
54
|
-h, --help Show this message
|
55
55
|
|
56
56
|
|
@@ -139,6 +139,16 @@ message with:
|
|
139
139
|
Per-file parsing is not supported. Run multiple instances.
|
140
140
|
|
141
141
|
|
142
|
+
### Optional: Run multiple instances
|
143
|
+
|
144
|
+
Run multiple instances to support more than one message-specific file format
|
145
|
+
(concurrently) or to specify distinct syslog hostnames. To do so, provide
|
146
|
+
an alternative PID filename as a command-line option to additional
|
147
|
+
instance(s), such as:
|
148
|
+
|
149
|
+
--pid-file remote_syslog_2.pid
|
150
|
+
|
151
|
+
|
142
152
|
## Reporting bugs
|
143
153
|
|
144
154
|
1. See whether the issue has already been reported: <https://github.com/papertrail/remote_syslog/issues/>
|
data/lib/remote_syslog.rb
CHANGED
data/lib/remote_syslog/cli.rb
CHANGED
@@ -7,8 +7,8 @@ require 'daemons'
|
|
7
7
|
module RemoteSyslog
|
8
8
|
class Cli
|
9
9
|
FIELD_REGEXES = {
|
10
|
-
'syslog' => /^(\w+
|
11
|
-
'rfc3339' => /^(\S+) (\
|
10
|
+
'syslog' => /^(\w+ +\d+ \S+) (\S+) ([^: ]+):? (.*)$/,
|
11
|
+
'rfc3339' => /^(\S+) (\S+) ([^: ]+):? (.*)$/
|
12
12
|
}
|
13
13
|
|
14
14
|
def self.process!(argv)
|
@@ -82,12 +82,12 @@ module RemoteSyslog
|
|
82
82
|
opts.on("-s", "--severity SEVERITY", "Severity (notice)") do |v|
|
83
83
|
@severity = v
|
84
84
|
end
|
85
|
-
opts.on("--tls", "Connect via TCP with TLS") do
|
86
|
-
@tls = true
|
87
|
-
end
|
88
85
|
opts.on("--strip-color", "Strip color codes") do
|
89
86
|
@strip_color = true
|
90
87
|
end
|
88
|
+
opts.on("--tls", "Connect via TCP with TLS") do
|
89
|
+
@tls = true
|
90
|
+
end
|
91
91
|
opts.on_tail("-h", "--help", "Show this message") do
|
92
92
|
puts opts
|
93
93
|
exit
|
data/lib/remote_syslog/reader.rb
CHANGED
@@ -28,12 +28,14 @@ module RemoteSyslog
|
|
28
28
|
@packet.hostname = local_hostname
|
29
29
|
@packet.facility = options[:facility] || 'user'
|
30
30
|
@packet.severity = options[:severity] || 'notice'
|
31
|
-
|
31
|
+
|
32
|
+
tag = options[:program] || File.basename(path) || File.basename($0)
|
32
33
|
|
33
34
|
# Make sure the tag isn't too long
|
34
|
-
if
|
35
|
-
|
35
|
+
if tag.length > 32
|
36
|
+
tag = tag[0..31]
|
36
37
|
end
|
38
|
+
@packet.tag = tag
|
37
39
|
end
|
38
40
|
|
39
41
|
def receive_data(data)
|
data/remote_syslog.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
## If your rubyforge_project name is different, then edit it and comment out
|
9
9
|
## the sub! line in the Rakefile
|
10
10
|
s.name = 'remote_syslog'
|
11
|
-
s.version = '1.3.
|
12
|
-
s.date = '2011-
|
11
|
+
s.version = '1.3.1'
|
12
|
+
s.date = '2011-08-04'
|
13
13
|
s.rubyforge_project = 'remote_syslog'
|
14
14
|
|
15
15
|
## Make sure your summary is short. The description may be as long
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 1.3.
|
8
|
+
- 1
|
9
|
+
version: 1.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Troy Davis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-04 00:00:00 -07:00
|
19
19
|
default_executable: remote_syslog
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|