remote_syslog 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module RemoteSyslog
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
4
4
 
5
5
  require 'remote_syslog/reader'
@@ -21,9 +21,14 @@ module RemoteSyslog
21
21
 
22
22
  @packet = SyslogProtocol::Packet.new
23
23
 
24
- local_hostname = options[:hostname] || (Socket.gethostname rescue `hostname`.chomp)
25
- if local_hostname.nil? || local_hostname.empty?
26
- local_hostname = 'localhost'
24
+ if options[:hostname] && options[:hostname] != ''
25
+ local_hostname = options[:hostname]
26
+ else
27
+ local_hostname = (Socket.gethostname rescue `hostname`.chomp)[/^([^\.]+)/, 1]
28
+
29
+ if local_hostname.nil? || local_hostname.empty?
30
+ local_hostname = 'localhost'
31
+ end
27
32
  end
28
33
 
29
34
  @packet.hostname = local_hostname
@@ -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.0'
12
- s.date = '2012-01-23'
11
+ s.version = '1.6.1'
12
+ s.date = '2012-02-03'
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-23 00:00:00.000000000Z
13
+ date: 2012-02-03 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemons
17
- requirement: &70314298406760 !ruby/object:Gem::Requirement
17
+ requirement: &70277515640720 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70314298406760
25
+ version_requirements: *70277515640720
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: eventmachine
28
- requirement: &70314298406200 !ruby/object:Gem::Requirement
28
+ requirement: &70277515640160 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.12.10
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70314298406200
36
+ version_requirements: *70277515640160
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: eventmachine-tail
39
- requirement: &70314298422140 !ruby/object:Gem::Requirement
39
+ requirement: &70277515656100 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70314298422140
47
+ version_requirements: *70277515656100
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: syslog_protocol
50
- requirement: &70314298421580 !ruby/object:Gem::Requirement
50
+ requirement: &70277515655540 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.9.1
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70314298421580
58
+ version_requirements: *70277515655540
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: em-resolv-replace
61
- requirement: &70314298421160 !ruby/object:Gem::Requirement
61
+ requirement: &70277515655120 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70314298421160
69
+ version_requirements: *70277515655120
70
70
  description: Lightweight daemon to tail one or more log files and transmit UDP syslog
71
71
  messages to a remote syslog host (centralized log aggregation). Generates UDP packets
72
72
  itself instead of depending on a system syslog daemon, so it doesn't affect system-wide