okcomputer 1.16.0 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 668d969c4dc663bf14304a9f68067ef371afe08e
4
- data.tar.gz: 749de937769d55fb8a178840e08e296abb02fd99
3
+ metadata.gz: 33f92465ed2dd57fac9952e50ae9e781b2a62d3a
4
+ data.tar.gz: cc714c99dbd91a357c7185f4a638fae97a4a11e3
5
5
  SHA512:
6
- metadata.gz: fff29eae61eeb8d501333c8acd3bb4a6c0d8c105767c3d8026535ccfd8e9c3812ae2835c4be81ba35fbac4bfe26809b4a68da7153770a22953081ec8a703134a
7
- data.tar.gz: 8031216b51a057519e3d5460bb4054260fd0095f1cedfe25eae20717704005a6a2f920b13bc702f152c326dc88ea4be8eabe1d9b9eca36708e36bcd8ca29dbd0
6
+ metadata.gz: b49e2f14a69e014adb41b4cc25245fb0829dea9a6471e8911ffbc1b4d3bb4fd2f07d5676b44f24fb511993135d24a05328ac13bd6b34e9e6b273860e6566bb3c
7
+ data.tar.gz: 1c94d99abd315f30503d5a95fead13a0cfaafb43e9ddc371bfa9cbc6382e139a26049772c0a8c8762bfcb6fb56a6af87fb7ad8e65bda55c4bf2de9112f254813
@@ -100,6 +100,18 @@ OkComputer.mount_at = false
100
100
  mount OkComputer::Engine, at: "/custom_path"
101
101
  ```
102
102
 
103
+ ### Logging check results
104
+
105
+ Log check results by setting `OkComputer.logger`. Note: results will be logged at the `info` level.
106
+
107
+ ```ruby
108
+ OkComputer.logger = Rails.logger
109
+ ```
110
+
111
+ ```sh
112
+ [okcomputer] mycheck: PASSED mymessage (0s)
113
+ ```
114
+
103
115
  ### Registering Additional Checks
104
116
 
105
117
  Register additional checks in an initializer, like so:
@@ -17,6 +17,7 @@ module OkComputer
17
17
  with_benchmarking do
18
18
  check
19
19
  end
20
+ OkComputer.logger.info "[okcomputer] #{to_text}"
20
21
  end
21
22
 
22
23
  # Private: Perform the appropriate check
@@ -58,6 +58,9 @@ module OkComputer
58
58
  # Public: Option to disable third-party app performance tools (.e.g NewRelic) from counting OkComputer routes towards their total.
59
59
  attr_accessor :analytics_ignore
60
60
 
61
+ # Public: Logger to use to log check results
62
+ attr_accessor :logger
63
+
61
64
  # Private: The username for access to checks
62
65
  attr_accessor :username
63
66
 
@@ -77,6 +80,7 @@ module OkComputer
77
80
  self.mount_at = 'okcomputer'
78
81
  self.check_in_parallel = false
79
82
  self.analytics_ignore = true
83
+ self.logger = Logger.new nil
80
84
  self.options = {}
81
85
 
82
86
  end
@@ -1,3 +1,3 @@
1
1
  module OkComputer
2
- VERSION = '1.16.0'
2
+ VERSION = '1.17.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okcomputer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-08 00:00:00.000000000 Z
13
+ date: 2017-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sqlite3
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.5.1
144
+ rubygems_version: 2.6.13
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: A simple, extensible health-check monitor