remote_logger 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +4 -0
- data/VERSION +1 -1
- data/lib/remote_logger/drb_logger.rb +5 -2
- data/lib/remote_logger/ringy_logger.rb +6 -2
- metadata +3 -3
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -3,10 +3,12 @@ module RemoteLogger
|
|
3
3
|
# Subclass of RemoteLogger::Logger communicating via DRb protocol
|
4
4
|
class DrbLogger < RemoteLogger::Logger
|
5
5
|
|
6
|
-
def self.start(
|
6
|
+
def self.start(options = {})
|
7
7
|
# Adding some security (disable remote eval)
|
8
8
|
$SAFE = 1
|
9
9
|
|
10
|
+
name = options[:name] || LOGGER_NAME
|
11
|
+
|
10
12
|
# Creating logger instance
|
11
13
|
logger = new options
|
12
14
|
|
@@ -21,8 +23,9 @@ module RemoteLogger
|
|
21
23
|
logger.info "#{name}: Service finished" if options[:verbose]
|
22
24
|
end
|
23
25
|
|
24
|
-
def self.find(
|
26
|
+
def self.find(options = {})
|
25
27
|
DRb.start_service
|
28
|
+
|
26
29
|
# Connecting to Logger
|
27
30
|
DRbObject.new_with_uri(options[:uri]||DRB_URI)
|
28
31
|
end
|
@@ -3,10 +3,12 @@ module RemoteLogger
|
|
3
3
|
# Subclass of RemoteLogger::Logger communicating via DRb protocol
|
4
4
|
class RingyLogger < Logger
|
5
5
|
|
6
|
-
def self.start(
|
6
|
+
def self.start(options = {})
|
7
7
|
# Adding some security (disable remote eval)
|
8
8
|
$SAFE = 1
|
9
9
|
|
10
|
+
name = options[:name] || LOGGER_NAME
|
11
|
+
|
10
12
|
# Creating logger instance
|
11
13
|
logger = RemoteLogger::Logger.new options
|
12
14
|
|
@@ -23,9 +25,11 @@ module RemoteLogger
|
|
23
25
|
logger.info "#{name}: Service finished" if options[:verbose]
|
24
26
|
end
|
25
27
|
|
26
|
-
def self.find(
|
28
|
+
def self.find(options = {})
|
27
29
|
DRb.start_service
|
28
30
|
|
31
|
+
name = options[:name] || LOGGER_NAME
|
32
|
+
|
29
33
|
# Connecting to Ring server
|
30
34
|
ring_server = Rinda::RingFinger.primary
|
31
35
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- arvicco
|