logging-remote-syslog 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/README.md +51 -0
- data/Rakefile +15 -0
- data/lib/logging/VERSION +1 -0
- data/lib/logging/appenders/remote-syslog.rb +170 -0
- data/lib/logging/remote-syslog.rb +22 -0
- data/logging-remote-syslog.gemspec +40 -0
- data/spec/logging/appenders/remote_syslog_spec.rb +58 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/rr.rb +20 -0
- metadata +161 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# logging/remote-syslog
|
2
|
+
|
3
|
+
logging/remote-syslog is a remote syslog appender for use with the Logging library. 
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
```bash
|
9
|
+
gem 'logging-remote-syslog'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
```bash
|
14
|
+
$ bundle
|
15
|
+
```
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
```bash
|
19
|
+
$ gem install logging-remote-syslog
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
```
|
25
|
+
require 'logging'
|
26
|
+
require 'logging/remote-syslog'
|
27
|
+
|
28
|
+
logger = Logging.logger['MyApp']
|
29
|
+
logger.add_appenders(
|
30
|
+
Logging.appenders.remote_syslog(ident, syslog_server: syslog_host, port: syslog_port)
|
31
|
+
)
|
32
|
+
|
33
|
+
logger.level = :info
|
34
|
+
logger.info 'MyApp Message'
|
35
|
+
|
36
|
+
```
|
37
|
+
|
38
|
+
## Tests
|
39
|
+
|
40
|
+
```
|
41
|
+
rake
|
42
|
+
```
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
1. Fork it
|
47
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
48
|
+
3. Write code and add _tests_
|
49
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
50
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
6. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler'
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
|
5
|
+
Bundler.setup
|
6
|
+
Bundler.require
|
7
|
+
|
8
|
+
require 'rspec/core/rake_task'
|
9
|
+
|
10
|
+
task :default => [:spec]
|
11
|
+
|
12
|
+
desc "Run all RSpec tests"
|
13
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
14
|
+
t.ruby_opts = ["-W0"]
|
15
|
+
end
|
data/lib/logging/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# Copyright (c) <2012> ['Tim Pease','Amy Sutedja', 'Paul Morton']
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
4
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
5
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
6
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
7
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
8
|
+
#
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
10
|
+
# substantial portions of the Software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
14
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
15
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
16
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
module Logging::Appenders
|
19
|
+
def self.remote_syslog( *args )
|
20
|
+
return Logging::Appenders::RemoteSyslog if args.empty?
|
21
|
+
Logging::Appenders::RemoteSyslog.new(*args)
|
22
|
+
end
|
23
|
+
|
24
|
+
# This class provides an Appender that can write to remote syslog.
|
25
|
+
#
|
26
|
+
class RemoteSyslog < Logging::Appender
|
27
|
+
# call-seq:
|
28
|
+
# RemoteSyslog.new( name, opts = {} )
|
29
|
+
#
|
30
|
+
# Create an appender that will log messages to remote syslog. The
|
31
|
+
# options that can be used to configure the appender are as follows:
|
32
|
+
#
|
33
|
+
# :ident => identifier string (name is used by default)
|
34
|
+
# :syslog_server => address of the remote syslog server
|
35
|
+
# :port => port of the remote syslog server
|
36
|
+
# :facility => the syslog facility to use
|
37
|
+
#
|
38
|
+
# The parameter :ident is a string that will be prepended to every
|
39
|
+
# message. The :facility parameter encodes a default facility to be
|
40
|
+
# assigned to all messages that do not have an explicit facility encoded.
|
41
|
+
#
|
42
|
+
# 'auth' The authorization system: login(1), su(1), getty(8),
|
43
|
+
# etc.
|
44
|
+
#
|
45
|
+
# 'authpriv' The same as 'auth', but logged to a file readable
|
46
|
+
# only by selected individuals.
|
47
|
+
#
|
48
|
+
# 'cron' The cron daemon: cron(8).
|
49
|
+
#
|
50
|
+
# 'daemon' System daemons, such as routed(8), that are not
|
51
|
+
# provided for explicitly by other facilities.
|
52
|
+
#
|
53
|
+
# 'ftp' The file transfer protocol daemons: ftpd(8), tftpd(8).
|
54
|
+
#
|
55
|
+
# 'kern' Messages generated by the kernel. These cannot be
|
56
|
+
# generated by any user processes.
|
57
|
+
#
|
58
|
+
# 'lpr' The line printer spooling system: lpr(1), lpc(8),
|
59
|
+
# lpd(8), etc.
|
60
|
+
#
|
61
|
+
# 'mail' The mail system.
|
62
|
+
#
|
63
|
+
# 'news' The network news system.
|
64
|
+
#
|
65
|
+
# 'syslog' Messages generated internally by syslogd(8).
|
66
|
+
#
|
67
|
+
# 'user' Messages generated by random user processes. This is
|
68
|
+
# the default facility identifier if none is specified.
|
69
|
+
#
|
70
|
+
# 'uucp' The uucp system.
|
71
|
+
#
|
72
|
+
# 'local0' Reserved for local use. Similarly for 'local1'
|
73
|
+
# through 'local7'.
|
74
|
+
#
|
75
|
+
# See SyslogProtocol::FACILITIES for the complete list of valid values.
|
76
|
+
#
|
77
|
+
def initialize( name, opts = {} )
|
78
|
+
@ident = opts.getopt(:ident, name)
|
79
|
+
@syslog_server = opts.getopt(:syslog_server, '127.0.0.1')
|
80
|
+
@port = opts.getopt(:port, 514, :as => Integer)
|
81
|
+
|
82
|
+
facility_name = opts.getopt(:facility, 'user')
|
83
|
+
|
84
|
+
@facility = ::SyslogProtocol::FACILITIES[facility_name]
|
85
|
+
|
86
|
+
# provides a mapping from the default Logging levels
|
87
|
+
# to the syslog levels
|
88
|
+
@map = ['debug', 'info', 'warn', 'err', 'crit']
|
89
|
+
|
90
|
+
map = opts.getopt(:map)
|
91
|
+
self.map = map unless map.nil?
|
92
|
+
|
93
|
+
super
|
94
|
+
end
|
95
|
+
|
96
|
+
# call-seq:
|
97
|
+
# map = { logging_levels => syslog_levels }
|
98
|
+
#
|
99
|
+
# Configure the mapping from the Logging levels to the syslog levels.
|
100
|
+
# This is needed in order to log events at the proper syslog level.
|
101
|
+
#
|
102
|
+
# Without any configuration, the following mapping will be used:
|
103
|
+
#
|
104
|
+
# :debug => 'debug'
|
105
|
+
# :info => 'info'
|
106
|
+
# :warn => 'warn'
|
107
|
+
# :error => 'err'
|
108
|
+
# :fatal => 'crit'
|
109
|
+
#
|
110
|
+
def map=( levels )
|
111
|
+
map = []
|
112
|
+
levels.keys.each do |lvl|
|
113
|
+
num = ::Logging.level_num(lvl)
|
114
|
+
map[num] = syslog_level_num(levels[lvl])
|
115
|
+
end
|
116
|
+
@map = map
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
# call-seq:
|
123
|
+
# write( event )
|
124
|
+
#
|
125
|
+
# Write the given _event_ to the syslog facility. The log event will be
|
126
|
+
# processed through the Layout associated with this appender. The message
|
127
|
+
# will be logged at the level specified by the event.
|
128
|
+
#
|
129
|
+
def write( event )
|
130
|
+
pri = SyslogProtocol::SEVERITIES['debug']
|
131
|
+
message = if event.instance_of?(::Logging::LogEvent)
|
132
|
+
pri = @map[event.level]
|
133
|
+
@layout.format(event)
|
134
|
+
else
|
135
|
+
event.to_s
|
136
|
+
end
|
137
|
+
return if message.empty?
|
138
|
+
|
139
|
+
udp_sender = RemoteSyslogLogger::UdpSender.new(
|
140
|
+
@syslog_server,
|
141
|
+
@port,
|
142
|
+
:facility => @facility,
|
143
|
+
:severity => pri,
|
144
|
+
:program => @ident
|
145
|
+
)
|
146
|
+
|
147
|
+
udp_sender.write(message)
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# call-seq:
|
153
|
+
# syslog_level_num( level ) => integer
|
154
|
+
#
|
155
|
+
# Takes the given _level_ as a string, symbol, or integer and returns
|
156
|
+
# the corresponding syslog level number.
|
157
|
+
#
|
158
|
+
def syslog_level_num( level )
|
159
|
+
case level
|
160
|
+
when Integer; level
|
161
|
+
when String, Symbol
|
162
|
+
level = level.to_s.downcase
|
163
|
+
SyslogProtocol::SEVERITIES[level]
|
164
|
+
else
|
165
|
+
raise ArgumentError, "unknown level '#{level}'"
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
end # RemoteSyslog
|
170
|
+
end # Logging::Appenders
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Copyright (c) <2012> ['Amy Sutedja', 'Paul Morton']
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
4
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
5
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
6
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
7
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
8
|
+
#
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
10
|
+
# substantial portions of the Software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
14
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
15
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
16
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
require "logging/appender"
|
19
|
+
require "syslog_protocol/common"
|
20
|
+
require "remote_syslog_logger/udp_sender"
|
21
|
+
|
22
|
+
require 'logging/appenders/remote-syslog'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# Copyright (c) <2012> ['Amy Sutedja', 'Paul Morton']
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
5
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
6
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
7
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
8
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
11
|
+
# substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
14
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
15
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
16
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
17
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
|
19
|
+
Gem::Specification.new do |gem|
|
20
|
+
gem.authors = ["Amy Sutedja", "Paul Morton"]
|
21
|
+
gem.email = ["asutedja@biaprotect.com", "pmorton@biaprotect.com"]
|
22
|
+
gem.description = "Remote syslog appender for Logging"
|
23
|
+
gem.summary = File.read('README.md')
|
24
|
+
gem.homepage = "https://github.com/BIAINC/logging-remote-syslog"
|
25
|
+
|
26
|
+
gem.files = `git ls-files`.split($\)
|
27
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
28
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
29
|
+
gem.name = "logging-remote-syslog"
|
30
|
+
gem.require_paths = ["lib"]
|
31
|
+
gem.version = File.read('./lib/logging/VERSION')
|
32
|
+
gem.license = 'MIT'
|
33
|
+
|
34
|
+
gem.add_runtime_dependency 'logging', '>= 1.7.2'
|
35
|
+
gem.add_runtime_dependency 'remote_syslog_logger', '>= 1.0.3'
|
36
|
+
|
37
|
+
gem.add_development_dependency 'rspec', '>= 2.10.0'
|
38
|
+
gem.add_development_dependency 'rake', '>= 0.9.2'
|
39
|
+
gem.add_development_dependency 'rr', '>= 1.0.4'
|
40
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Copyright (c) <2012> ['Amy Sutedja', 'Paul Morton']
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
4
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
5
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
6
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
7
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
8
|
+
#
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
10
|
+
# substantial portions of the Software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
14
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
15
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
16
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
require 'spec_helper'
|
19
|
+
|
20
|
+
# Logging Logger
|
21
|
+
Logging.logger[::Logging].add_appenders(Logging.appenders.stdout)
|
22
|
+
Logging.logger[::Logging].level = :info
|
23
|
+
|
24
|
+
describe Logging::Appenders::RemoteSyslog do
|
25
|
+
it 'can be instantiated' do
|
26
|
+
Logging.appenders.remote_syslog('Test').should be_an_instance_of(Logging::Appenders::RemoteSyslog)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'can log' do
|
30
|
+
syslog_host = 'logs.papertrailapp.com'
|
31
|
+
syslog_port = 63961
|
32
|
+
ident = 'Test'
|
33
|
+
message = 'Test Message'
|
34
|
+
level = :info
|
35
|
+
facility = 'local6'
|
36
|
+
|
37
|
+
any_instance_of(RemoteSyslogLogger::UdpSender) do |s|
|
38
|
+
stub(s).initialize do |*args|
|
39
|
+
args[0].should == syslog_host
|
40
|
+
args[1].should == syslog_port
|
41
|
+
args[2][:facility].should == SyslogProtocol::FACILITIES[facility]
|
42
|
+
args[2][:severity].should == 'info'
|
43
|
+
args[2][:program].should == ident
|
44
|
+
end
|
45
|
+
|
46
|
+
stub(s).write do |*args|
|
47
|
+
args.first.should == " #{level.to_s.upcase} #{ident} : #{message}\n"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
logger = Logging.logger['Test']
|
52
|
+
logger.add_appenders(
|
53
|
+
Logging.appenders.remote_syslog(ident, :syslog_server => syslog_host, :port => syslog_port, :facility => facility)
|
54
|
+
)
|
55
|
+
logger.level = level
|
56
|
+
logger.info("Test Message").should == true
|
57
|
+
end
|
58
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright (c) <2012> ['Amy Sutedja', 'Paul Morton']
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
4
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
5
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
6
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
7
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
8
|
+
#
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
10
|
+
# substantial portions of the Software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
14
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
15
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
16
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
Dir['./spec/support/**/*.rb'].map {|f| require f}
|
19
|
+
|
20
|
+
require 'logging'
|
21
|
+
require 'logging/remote-syslog'
|
data/spec/support/rr.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright (c) <2012> ['Amy Sutedja', 'Paul Morton']
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
4
|
+
# software and associated documentation files (the "Software"), to deal in the Software
|
5
|
+
# without restriction, including without limitation the rights to use, copy, modify, merge,
|
6
|
+
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
7
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
8
|
+
#
|
9
|
+
# The above copyright notice and this permission notice shall be included in all copies or
|
10
|
+
# substantial portions of the Software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
13
|
+
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
14
|
+
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
15
|
+
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
16
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
RSpec.configure do |configuration|
|
19
|
+
configuration.mock_with :rr
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: logging-remote-syslog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Amy Sutedja
|
9
|
+
- Paul Morton
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-06-26 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: logging
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.7.2
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 1.7.2
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: remote_syslog_logger
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 1.0.3
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.0.3
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.10.0
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 2.10.0
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rake
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 0.9.2
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 0.9.2
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: rr
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 1.0.4
|
87
|
+
type: :development
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 1.0.4
|
95
|
+
description: Remote syslog appender for Logging
|
96
|
+
email:
|
97
|
+
- asutedja@biaprotect.com
|
98
|
+
- pmorton@biaprotect.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- .gitignore
|
104
|
+
- .rspec
|
105
|
+
- .travis.yml
|
106
|
+
- Gemfile
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- lib/logging/VERSION
|
110
|
+
- lib/logging/appenders/remote-syslog.rb
|
111
|
+
- lib/logging/remote-syslog.rb
|
112
|
+
- logging-remote-syslog.gemspec
|
113
|
+
- spec/logging/appenders/remote_syslog_spec.rb
|
114
|
+
- spec/spec_helper.rb
|
115
|
+
- spec/support/rr.rb
|
116
|
+
homepage: https://github.com/BIAINC/logging-remote-syslog
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ! '>='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
hash: 3243274781071415485
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ! '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
hash: 3243274781071415485
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 1.8.24
|
144
|
+
signing_key:
|
145
|
+
specification_version: 3
|
146
|
+
summary: ! '# logging/remote-syslog logging/remote-syslog is a remote syslog appender
|
147
|
+
for use with the Logging library.  ##
|
148
|
+
Installation Add this line to your application''s Gemfile: ```bash gem ''logging-remote-syslog''
|
149
|
+
``` And then execute: ```bash $ bundle ``` Or install it yourself as: ```bash
|
150
|
+
$ gem install logging-remote-syslog ``` ## Usage ``` require ''logging'' require
|
151
|
+
''logging/remote-syslog'' logger = Logging.logger[''MyApp''] logger.add_appenders(
|
152
|
+
Logging.appenders.remote_syslog(ident, syslog_server: syslog_host, port: syslog_port)
|
153
|
+
) logger.level = :info logger.info ''MyApp Message'' ``` ## Tests ``` rake ``` ##
|
154
|
+
Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)
|
155
|
+
3. Write code and add _tests_ 4. Commit your changes (`git commit -am ''Added some
|
156
|
+
feature''`) 5. Push to the branch (`git push origin my-new-feature`) 6. Create new
|
157
|
+
Pull Request'
|
158
|
+
test_files:
|
159
|
+
- spec/logging/appenders/remote_syslog_spec.rb
|
160
|
+
- spec/spec_helper.rb
|
161
|
+
- spec/support/rr.rb
|