remote_syslog 1.6.7.pre1 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -43,7 +43,7 @@ specified as command-line arguments (below).
43
43
  -f, --facility FACILITY Facility (user)
44
44
  --hostname HOST Local hostname to send from
45
45
  -P, --pid-dir DIRECTORY DEPRECATED: Directory to write .pid file in
46
- --pid-file FILENAME Location of the PID file (default /Users/eric/remote_syslog.pid)
46
+ --pid-file FILENAME Location of the PID file (default /var/run/remote_syslog.pid)
47
47
  --parse-syslog Parse file as syslog-formatted file
48
48
  -s, --severity SEVERITY Severity (notice)
49
49
  --strip-color Strip color codes
@@ -174,17 +174,6 @@ than the current set of matches). This is not necessary for globs defined in
174
174
  the config file.
175
175
 
176
176
 
177
- ### Excluding files from being sent
178
-
179
- Provide one or more regular expressions to prevent certain files from being
180
- matched.
181
-
182
- exclude_files:
183
- - \.\d$
184
- - .bz2
185
- - .gz
186
-
187
-
188
177
  ### Multiple instances
189
178
 
190
179
  Run multiple instances to support more than one message-specific file format
data/lib/remote_syslog.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module RemoteSyslog
2
- VERSION = "1.6.7.pre1"
2
+ VERSION = "1.6.7"
3
3
  end
4
4
 
@@ -23,17 +23,11 @@ module RemoteSyslog
23
23
  attr_accessor :facility, :severity, :hostname
24
24
 
25
25
  # Other settings
26
- attr_accessor :strip_color, :parse_fields
26
+ attr_accessor :strip_color, :parse_fields, :exclude_pattern
27
27
 
28
- # Exclude messages matching pattern
29
- attr_accessor :exclude_pattern
30
-
31
- # Files (can be globs)
28
+ # Files
32
29
  attr_reader :files
33
30
 
34
- # Exclude files matching pattern
35
- attr_accessor :exclude_file_pattern
36
-
37
31
  # How often should we check for new files?
38
32
  attr_accessor :glob_check_interval
39
33
 
@@ -113,7 +107,7 @@ module RemoteSyslog
113
107
 
114
108
  files.each do |file|
115
109
  RemoteSyslog::GlobWatch.new(file, @glob_check_interval,
116
- @exclude_file_pattern, method(:watch_file))
110
+ method(:watch_file))
117
111
  end
118
112
  end
119
113
  end
@@ -178,6 +178,17 @@ module RemoteSyslog
178
178
  end
179
179
  end
180
180
 
181
+ # We're dealing with an old-style pid_file
182
+ if @agent.pid_file && File.basename(@agent.pid_file) == @agent.pid_file
183
+ default_pid_dir = File.dirname(default_pid_file)
184
+
185
+ @agent.pid_file = File.join(default_pid_dir, @agent.pid_file)
186
+
187
+ if File.extname(@agent.pid_file) == ''
188
+ @agent.pid_file << '.pid'
189
+ end
190
+ end
191
+
181
192
  @agent.pid_file ||= default_pid_file
182
193
 
183
194
  if !@no_detach && !::Servolux.fork?
@@ -217,14 +228,6 @@ module RemoteSyslog
217
228
  if config['exclude_patterns']
218
229
  @agent.exclude_pattern = Regexp.new(config['exclude_patterns'].map { |r| "(#{r})" }.join('|'))
219
230
  end
220
-
221
- if config['exclude_files']
222
- @agent.exclude_file_pattern = Regexp.new(config['exclude_files'].map { |r| "(#{r})" }.join('|'))
223
- end
224
-
225
- if config['new_file_check_interval']
226
- @agent.glob_check_interval = config['new_file_check_interval']
227
- end
228
231
  end
229
232
 
230
233
  def run
@@ -2,19 +2,12 @@ require 'eventmachine-tail'
2
2
 
3
3
  module RemoteSyslog
4
4
  class GlobWatch < EventMachine::FileGlobWatch
5
- def initialize(path, interval, exclude_files, callback)
6
- @exclude_files = exclude_files
7
- @callback = callback
8
-
5
+ def initialize(path, interval, callback)
9
6
  super(path, interval)
7
+ @callback = callback
10
8
  end
11
9
 
12
10
  def file_found(path)
13
- # Check if we should exclude this file
14
- if @exclude_files && @exclude_files =~ path
15
- return
16
- end
17
-
18
11
  @callback.call(path)
19
12
  end
20
13
 
@@ -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.6.7.pre1'
12
- s.date = '2012-09-04'
11
+ s.version = '1.6.7'
12
+ s.date = '2012-09-10'
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
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_syslog
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 1
7
7
  - 6
8
8
  - 7
9
- - pre1
10
- version: 1.6.7.pre1
9
+ version: 1.6.7
11
10
  platform: ruby
12
11
  authors:
13
12
  - Troy Davis
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2012-09-04 00:00:00 -07:00
18
+ date: 2012-09-10 00:00:00 -07:00
20
19
  default_executable: remote_syslog
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -152,13 +151,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
151
  version: "0"
153
152
  required_rubygems_version: !ruby/object:Gem::Requirement
154
153
  requirements:
155
- - - ">"
154
+ - - ">="
156
155
  - !ruby/object:Gem::Version
157
156
  segments:
158
- - 1
159
- - 3
160
- - 1
161
- version: 1.3.1
157
+ - 0
158
+ version: "0"
162
159
  requirements: []
163
160
 
164
161
  rubyforge_project: remote_syslog