rails_semantic_logger 1.6.1 → 1.7.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: 4b40941e0afc3473dcbd06969af45d8a9f6ff47d
4
- data.tar.gz: 34897336d250e32a0df5be64f2600c831b5a05ef
3
+ metadata.gz: e0ba076a278a52b2e5e229503de7a3c94b9ece9c
4
+ data.tar.gz: 136823b20fb5d12ba775bc0d5c92829b79122d0a
5
5
  SHA512:
6
- metadata.gz: ffa352a01ab7dc1431a1e328192a32730c56390fd60234bbe3ed0b237f391dc94bd42c3f5f93f9177478798009f1897b4bc0558e25ce49e6cb5ccc166adcb960
7
- data.tar.gz: b5e0a96ff4d1a3a9187b7879263af9606349cc9ee442c6cb843d377657e081df562995f84a168573e1ea3bfc5c54f300de6c90bf620de9a57e8954f204995043
6
+ metadata.gz: 4c950494c841509d6be9e3ad8a244f724c0c1393e2c6d71ce66e9d4cd511372e020d1c50b1dd55871313eb3521eb3006485fa4008838840ab612a4346932280b
7
+ data.tar.gz: d0d57934657536e66f09f8ba60ec619bdc4c975d14e686308acc897a7ec69dcc81c4e0e7f9b534dd212bd0efbe8fcd020c7ac27a770be4268d1fcfd7cb4cc0a4
data/LICENSE.txt CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2012, 2013, 2014 Reid Morrison
189
+ Copyright 2012, 2013, 2014, 2015 Reid Morrison
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,50 +1,27 @@
1
- rails_semantic_logger
2
- =====================
1
+ # rails_semantic_logger
2
+ ![](https://img.shields.io/gem/v/rails_semantic_logger.svg) ![](https://img.shields.io/gem/dt/semantic_logger.svg) ![](https://img.shields.io/badge/status-production%20ready-blue.svg)
3
3
 
4
4
  Next generation logging system for Rails to support highly concurrent, high throughput, low latency systems
5
5
 
6
- Rails Semantic Logger replaces the Rails default logger with [Semantic Logger](http://github.com/reidmorrison/semantic_logger)
6
+ Rails Semantic Logger replaces the Rails default logger with [Semantic Logger](http://github.com/rocketjob/semantic_logger)
7
7
 
8
- * http://github.com/reidmorrison/rails_semantic_logger
8
+ * http://github.com/rocketjob/rails_semantic_logger
9
9
 
10
10
  ## Documentation
11
11
 
12
- For complete documentation see: http://reidmorrison.github.io/semantic_logger/rails
12
+ For complete documentation see: http://rocketjob.github.io/semantic_logger/rails
13
13
 
14
- ## Dependencies
14
+ ## Supports
15
15
 
16
- - Ruby 1.8.7, 1.9.3, 2.0, 2.1 (and above) Or, JRuby 1.6.3 (or above)
17
- - Rails 2, 3, 4 and above
18
-
19
- ## Meta
20
-
21
- * Code: `git clone git://github.com/reidmorrison/rails_semantic_logger.git`
22
- * Home: <https://github.com/reidmorrison/rails_semantic_logger>
23
- * Bugs: <http://github.com/reidmorrison/rails_semantic_logger/issues>
24
- * Gems: <http://rubygems.org/gems/rails_semantic_logger>
25
-
26
- This project uses [Semantic Versioning](http://semver.org/).
16
+ - Ruby 1.9.3, 2.0, 2.1, 2.2 (or above) Or, JRuby 1.7, 9.0 (or above)
17
+ - Rails 3, 4, 5 (or above)
27
18
 
28
19
  ## Author
29
20
 
30
- Reid Morrison :: reidmo@gmail.com :: @reidmorrison
31
-
32
- ## Contributors
21
+ [Reid Morrison](https://github.com/reidmorrison)
33
22
 
34
- Marc Bellingrath :: marrrc.b@gmail.com
23
+ [Contributors](https://github.com/rocketjob/rails_semantic_logger/graphs/contributors)
35
24
 
36
- ## License
25
+ ## Versioning
37
26
 
38
- Copyright 2012, 2013, 2014 Reid Morrison
39
-
40
- Licensed under the Apache License, Version 2.0 (the "License");
41
- you may not use this file except in compliance with the License.
42
- You may obtain a copy of the License at
43
-
44
- http://www.apache.org/licenses/LICENSE-2.0
45
-
46
- Unless required by applicable law or agreed to in writing, software
47
- distributed under the License is distributed on an "AS IS" BASIS,
48
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
- See the License for the specific language governing permissions and
50
- limitations under the License.
27
+ This project uses [Semantic Versioning](http://semver.org/).
@@ -1,4 +1,5 @@
1
1
  require 'logger'
2
+ require 'rails/commands/server'
2
3
  module RailsSemanticLogger #:nodoc:
3
4
  class Railtie < Rails::Railtie #:nodoc:
4
5
  # Make the SemanticLogger config available in the Rails application config
@@ -45,7 +46,7 @@ module RailsSemanticLogger #:nodoc:
45
46
  # Set internal logger to log to file only, in case another appender
46
47
  # experiences errors during writes
47
48
  appender = SemanticLogger::Appender::File.new(path, config.log_level)
48
- appender.name = "SemanticLogger"
49
+ appender.name = 'SemanticLogger'
49
50
  SemanticLogger::Logger.logger = appender
50
51
 
51
52
  # Add the log file to the list of appenders
@@ -110,7 +111,36 @@ module RailsSemanticLogger #:nodoc:
110
111
 
111
112
  # Replace the Sidekiq logger
112
113
  Sidekiq::Logging.logger = SemanticLogger[Sidekiq] if defined?(Sidekiq)
114
+
115
+ # Replace the Sidetiq logger
116
+ Sidetiq.logger = SemanticLogger[Sidetiq] if defined?(Sidetiq)
117
+
118
+ # Replace the Bugsnag logger
119
+ Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
120
+ end
121
+
122
+ end
123
+ end
124
+
125
+ # Patch the Rails::Server log_to_stdout so that it logs via SemanticLogger
126
+ module Rails #:nodoc:
127
+ class Server #:nodoc:
128
+ private
129
+
130
+ def log_to_stdout
131
+ SemanticLogger.add_appender($stdout, &SemanticLogger::Appender::Base.colorized_formatter)
113
132
  end
133
+ end
134
+ end
135
+
136
+ # Patch ActiveJob logger
137
+ if Rails.version.to_f >= 4.2
138
+ require 'active_job/logging'
114
139
 
140
+ module ActiveJob::Logging
141
+ private
142
+ def tag_logger(*tags, &block)
143
+ logger.tagged(*tags, &block)
144
+ end
115
145
  end
116
146
  end
@@ -1,3 +1,3 @@
1
1
  module RailsSemanticLogger #:nodoc
2
- VERSION = "1.6.1"
2
+ VERSION = '1.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-26 00:00:00.000000000 Z
11
+ date: 2015-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger
@@ -37,7 +37,7 @@ files:
37
37
  - lib/rails_semantic_logger.rb
38
38
  - lib/rails_semantic_logger/railtie.rb
39
39
  - lib/rails_semantic_logger/version.rb
40
- homepage: https://github.com/reidmorrison/rails_semantic_logger
40
+ homepage: https://github.com/rocketjob/rails_semantic_logger
41
41
  licenses:
42
42
  - Apache License V2.0
43
43
  metadata: {}
@@ -57,8 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 2.2.2
60
+ rubygems_version: 2.4.5.1
61
61
  signing_key:
62
62
  specification_version: 4
63
- summary: Improved logging for Ruby on Rails
63
+ summary: Scalable, next generation enterprise logging for Ruby on Rails
64
64
  test_files: []