mongo_ha 1.11.1 → 1.11.2
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.
- checksums.yaml +4 -4
- data/lib/mongo_ha.rb +0 -7
- data/lib/mongo_ha/mongo_client.rb +15 -0
- data/lib/mongo_ha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78407d75c1f21d09e9948b2ec15911b63c307750
|
4
|
+
data.tar.gz: 83b49c09a6092308c163d1d25e978c944ed06517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4c1f1ee2caac5429c2caa09718aa64ffd5dcf72279c2a89473ce3bfe2b42c3c70d945437b76bdc59ae9b0d3677bbcf8ac2767530a146b764d2019135ce67b80
|
7
|
+
data.tar.gz: 2c1d777c770bbe3a73ee45a8ca7ca823d046d03f8b5fd35bb652e13b4b5cd2b45e4529a77faa0b7b084b48a6f8e23de7f26428ba6951676f2689f334931dd57e
|
data/lib/mongo_ha.rb
CHANGED
@@ -3,13 +3,6 @@ require 'mongo_ha/version'
|
|
3
3
|
require 'mongo_ha/mongo_client'
|
4
4
|
require 'mongo_ha/networking'
|
5
5
|
|
6
|
-
# Give MongoClient a class-specific logger if SemanticLogger is available
|
7
|
-
# to give better logging information during a connection recovery scenario
|
8
|
-
if defined?(SemanticLogger)
|
9
|
-
Mongo::MongoClient.send(:include, SemanticLogger::Loggable)
|
10
|
-
Mongo::MongoClient.send(:define_method, :logger) { super() }
|
11
|
-
end
|
12
|
-
|
13
6
|
# Add in retry methods
|
14
7
|
Mongo::MongoClient.send(:include, MongoHA::MongoClient::InstanceMethods)
|
15
8
|
|
@@ -35,6 +35,21 @@ module MongoHA
|
|
35
35
|
# Add retry logic to MongoClient
|
36
36
|
def self.included(base)
|
37
37
|
base.class_eval do
|
38
|
+
# Give MongoClient a class-specific logger if SemanticLogger V2.12 or above is available
|
39
|
+
# to give better logging information during a connection recovery scenario
|
40
|
+
if defined?(SemanticLogger::DebugAsTraceLogger)
|
41
|
+
# Map Debug level calls to trace to reduce log file clutter
|
42
|
+
@@logger = SemanticLogger::DebugAsTraceLogger.new(self)
|
43
|
+
|
44
|
+
def self.logger
|
45
|
+
@@logger
|
46
|
+
end
|
47
|
+
|
48
|
+
def logger
|
49
|
+
self.class.logger
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
38
53
|
alias_method :receive_message_original, :receive_message
|
39
54
|
alias_method :connect_original, :connect
|
40
55
|
alias_method :valid_opts_original, :valid_opts
|
data/lib/mongo_ha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_ha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongo
|