ezlog 0.7.0 → 0.9.5

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
  SHA256:
3
- metadata.gz: a3448fa736b7d0c38391f77c299ca38185705c50bfb9a48230166b1bf95d5cea
4
- data.tar.gz: 6334e6cfbca5a00b5c10d3c272533711613d556bf4d452176a055ba876dae8f9
3
+ metadata.gz: 70fb33130f877332e30cbad096c74d1eeed80bba66f8c9ebedf0854f73bf95aa
4
+ data.tar.gz: 6bcb5959c18eb00a5065a86dd99ac02b193e8fb693cd195b201bdb07bc5e1fe4
5
5
  SHA512:
6
- metadata.gz: faa9b4f39da472e3e353c8d2d0f95a36f08eae1ca631f0c1611907488da9fbd80dc3a330cde6f7f103056a34e7a0e72469e53580d36180b9119f3c5e96bc03bf
7
- data.tar.gz: 24798f5e9e2d2308f443bc2c4a72612aab10e389599fa45ce8eea535bf68fb104f9da8c3c1a8f4ceda225215597ab7f85a1e314985841679376c40e5deebd06c
6
+ metadata.gz: c9675aea648f31869dfc248199f05cae2dad3b62aed3352c9383d7626d70cf5a7a0c302b58ddb74f04c45c6177a64e94d46ed84dcf2af55f44eba3c0c22b83ae
7
+ data.tar.gz: '092a73292dd85f7e8bb918b01a2e972f6c828984aaaf1230f580b456134e94f428948e61212231ee9576b11d92b44cb706ce4f54af8fd735c1eb1074f2a90e67'
@@ -1,3 +1,84 @@
1
+ ### 0.9.5 (2020-10-1)
2
+
3
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.4...v0.9.5)
4
+
5
+ * Fix
6
+ * fixing an issue with the Sidekiq job's log context generation:
7
+ using a namespaced Sidekiq worker (`SomeModule::SomeWorker`) cause the log context generations to fail with: `NameError: wrong constant name SomeModule::SomeWorker`
8
+
9
+ ### 0.9.4 (2020-09-26)
10
+
11
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.3...v0.9.4)
12
+
13
+ * Features & enhancements
14
+ * added Ruby 2.7 to the list of version CI will test the code with
15
+ * remove dot-files and Rakefile from the gem
16
+ * Fix
17
+ * stop using `Hash#merge` with multiple arguments as it's only supported from Ruby 2.6
18
+
19
+ ### 0.9.3 (2020-09-20)
20
+
21
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.2...v0.9.3)
22
+
23
+ * Features & enhancements
24
+ * Switching to [Oj](https://github.com/ohler55/oj) for fast JSON serialization
25
+ * Allow level to be formatted (so it can be logged as a number too)
26
+
27
+ if you want to use Ougai-like numbers you can do something like this:
28
+ ```ruby
29
+ config.ezlog.layout_options = { level_formatter: ->(level_number) { (level_number + 2) * 10 } }
30
+
31
+ Rails.logger.error('Boom!')
32
+ #=> {"logger":"Application","timestamp":"2020-09-20T19:29:03+02:00","level":50,"hostname":"BUD010256.local","pid":19872,"message":"Boom!"}
33
+ ```
34
+ * initial context (a context which will be added to every single line of log) can be configured via `config.ezlog.layout_options` and it defaults to `{environment: ::Rails.env}`
35
+
36
+ ### 0.9.2 (2020-09-19)
37
+
38
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.1...v0.9.2)
39
+
40
+ * Features & enhancements
41
+ * Improvements of the [Sidekiq](https://github.com/mperham/sidekiq) integration
42
+ * supports additional job information: batch id, tags and thread id (bid, tags, tid)
43
+ * support logging "death" events (setting up a death_handler)
44
+
45
+ ### 0.9.1 (2020-05-10)
46
+
47
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.0...v0.9.1)
48
+
49
+ * Bug fixed
50
+ * Fixed a bug in access log exclusion pattern matching that would exclude partial matches for a path if it was
51
+ specified as a string (expecting to be excluded only in case of a full match).
52
+
53
+ ### 0.9.0 (2020-05-10)
54
+
55
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.8.0...v0.9.0)
56
+
57
+ * Features & enhancements
58
+ * Ezlog now supports [Rails](https://rubyonrails.org/) 6.
59
+ * Added the ability to exclude certain paths from access logging. Use the `exclude_paths` configuration option to
60
+ add paths (strings or regexps) to exclude from your access logs.
61
+
62
+ ### 0.8.0 (2020-04-07)
63
+
64
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.7.1...v0.8.0)
65
+
66
+ * Bug fixes
67
+ * Reverted the change introduced in `v0.5.2` which extended the [Sidekiq](https://github.com/mperham/sidekiq) logger
68
+ interface because it caused problems with other third-party integrations
69
+ (e.g. [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs)).
70
+ [Sidekiq](https://github.com/mperham/sidekiq) itself removed this interface element in `v6.0.1`, so the current
71
+ change breaks compatibility with [Sidekiq](https://github.com/mperham/sidekiq) `v6.0.0` exclusively. If you're
72
+ using that version, please upgrade.
73
+
74
+ ### 0.7.1 (2020-03-12)
75
+
76
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.7.0...v0.7.1)
77
+
78
+ * Bug fixes
79
+ * Fixed a bug in the [Sidekiq](https://github.com/mperham/sidekiq) error handler which caused the error handler
80
+ to throw an additional error if there was no job hash in the original error context.
81
+
1
82
  ### 0.7.0 (2020-03-11)
2
83
 
3
84
  [Full Changelog](https://github.com/emartech/ezlog/compare/v0.6.0...v0.7.0)
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  Ezlog is intended to be a zero-configuration structured logging setup for pure Ruby or [Ruby on Rails](https://rubyonrails.org/)
7
7
  projects using any (or all) of the following libraries or frameworks:
8
8
 
9
- * [Ruby on Rails](https://rubyonrails.org/)
9
+ * [Ruby on Rails](https://rubyonrails.org/) (5.x and 6.x supported)
10
10
  * [Sidekiq](https://github.com/mperham/sidekiq)
11
11
  * [Sequel](https://sequel.jeremyevans.net/)
12
12
  * [Rack::Timeout](https://github.com/heroku/rack-timeout)
@@ -134,6 +134,12 @@ Using this configuration, Ezlog will only log the `action` parameter under the `
134
134
  all parameters serialized into a single string under the key `params_serialized`. You won't lose any information,
135
135
  but you can make sure that only the relevant parameters of your requests are searchable (and thus protect your logs).
136
136
 
137
+ Should you want to exclude certain paths (e.g. a healthcheck URL) from your access logs, you can use the following option:
138
+
139
+ ```ruby
140
+ config.ezlog.exclude_paths = ['/healthcheck', %r(/monitoring/.*)] # default is empty so everything gets logged
141
+ ```
142
+
137
143
  #### The log level
138
144
 
139
145
  The logger's log level is determined as follows (in order of precedence):
@@ -16,16 +16,17 @@ Gem::Specification.new do |spec|
16
16
  }
17
17
 
18
18
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^((test|spec|features)/|Rakefile|\.)}) }
20
20
  end
21
21
  spec.bindir = "exe"
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_dependency "logging", "~> 2.0"
26
+ spec.add_dependency "oj", "~> 3.0"
26
27
 
27
28
  spec.add_development_dependency "bundler", "~> 2.0"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rake", ">= 12.3.3"
29
30
  spec.add_development_dependency "rspec", "~> 3.0"
30
31
  spec.add_development_dependency "sidekiq", ">= 5.0"
31
32
  spec.add_development_dependency "sequel", "~> 5.0"
@@ -1,10 +1,11 @@
1
1
  require 'time'
2
- require 'json'
2
+ require 'oj'
3
3
 
4
4
  module Ezlog
5
5
  class LoggingLayout < ::Logging::Layout
6
- def initialize(context = {})
6
+ def initialize(context = {}, options = {})
7
7
  @initial_context = context
8
+ @level_formatter = options.fetch(:level_formatter, ->(numeric_level) { ::Logging::LNAMES[numeric_level] })
8
9
  end
9
10
 
10
11
  def format(event)
@@ -12,7 +13,7 @@ module Ezlog
12
13
  add_initial_context_to log_entry
13
14
  add_logging_context_to log_entry
14
15
  add_event_information_to log_entry, event
15
- ::JSON.dump(log_entry) + "\n"
16
+ ::Oj.dump(log_entry, mode: :json) + "\n"
16
17
  end
17
18
 
18
19
  private
@@ -20,8 +21,8 @@ module Ezlog
20
21
  def basic_information_for(event)
21
22
  {
22
23
  'logger' => event.logger,
23
- 'timestamp' => event.time.iso8601,
24
- 'level' => ::Logging::LNAMES[event.level],
24
+ 'timestamp' => event.time.iso8601(3),
25
+ 'level' => @level_formatter.call(event.level),
25
26
  'hostname' => Socket.gethostname,
26
27
  'pid' => Process.pid
27
28
  }
@@ -46,17 +47,17 @@ module Ezlog
46
47
  when Hash
47
48
  obj
48
49
  else
49
- {message: obj}
50
+ { 'message' => obj }
50
51
  end
51
52
  end
52
53
 
53
54
  def exception_message_by(exception)
54
55
  {
55
- message: exception.message,
56
- error: {
57
- class: exception.class.name,
58
- message: exception.message,
59
- backtrace: exception.backtrace&.first(20)
56
+ 'message' => exception.message,
57
+ 'error' => {
58
+ 'class' => exception.class.name,
59
+ 'message' => exception.message,
60
+ 'backtrace' => exception.backtrace&.first(20)
60
61
  }
61
62
  }
62
63
  end
@@ -3,10 +3,10 @@ module Ezlog
3
3
  class AccessLog
4
4
  include LogContextHelper
5
5
 
6
- def initialize(app, logger, whitelisted_params)
6
+ def initialize(app, logger, config)
7
7
  @app = app
8
8
  @logger = logger
9
- @whitelisted_params = whitelisted_params&.map &:to_s
9
+ @config = config
10
10
  end
11
11
 
12
12
  def call(env)
@@ -29,23 +29,36 @@ module Ezlog
29
29
  end
30
30
 
31
31
  def log_request(request, status)
32
+ return if path_ignored?(request)
33
+
32
34
  message = {
33
35
  message: '%s %s - %i (%s)' % [request.method, request.filtered_path, status, Rack::Utils::HTTP_STATUS_CODES[status]],
34
36
  remote_ip: request.remote_ip,
35
37
  method: request.method,
36
38
  path: request.filtered_path,
37
- params: params_to_log_in(request),
39
+ params: params_to_log(request),
38
40
  response_status_code: status
39
41
  }
40
- message.merge! params_serialized: request.filtered_parameters.inspect if @whitelisted_params
42
+ message.merge! params_serialized: request.filtered_parameters.inspect if @config.log_only_whitelisted_params
41
43
  @logger.info message
42
44
  end
43
45
 
44
- def params_to_log_in(request)
45
- if @whitelisted_params.nil?
46
- request.filtered_parameters
46
+ def path_ignored?(request)
47
+ @config.exclude_paths.any? do |pattern|
48
+ case pattern
49
+ when Regexp
50
+ pattern.match? request.path
51
+ else
52
+ pattern == request.path
53
+ end
54
+ end
55
+ end
56
+
57
+ def params_to_log(request)
58
+ if @config.log_only_whitelisted_params
59
+ request.filtered_parameters.slice *@config.whitelisted_params&.map(&:to_s)
47
60
  else
48
- request.filtered_parameters.slice *@whitelisted_params
61
+ request.filtered_parameters
49
62
  end
50
63
  end
51
64
  end
@@ -4,13 +4,18 @@ module Ezlog
4
4
  config.ezlog.enable_sequel_logging = false
5
5
  config.ezlog.log_only_whitelisted_params = false
6
6
  config.ezlog.whitelisted_params = [:controller, :action]
7
+ config.ezlog.exclude_paths = []
8
+ config.ezlog.initial_context = { environment: ::Rails.env }
9
+ config.ezlog.layout_options = {}
7
10
 
8
11
  initializer "ezlog.initialize" do
9
12
  require "ezlog/rails/extensions"
10
13
  end
11
14
 
12
15
  initializer 'ezlog.configure_logging' do |app|
13
- ::Logging.logger.root.appenders = ::Logging.appenders.stdout 'stdout', layout: Ezlog::LoggingLayout.new(environment: ::Rails.env)
16
+ ::Logging.logger.root.appenders =
17
+ ::Logging.appenders.stdout 'stdout', layout: Ezlog::LoggingLayout.new(app.config.ezlog.initial_context,
18
+ app.config.ezlog.layout_options)
14
19
  ::Logging.logger.root.level = app.config.log_level
15
20
  end
16
21
 
@@ -29,16 +34,26 @@ module Ezlog
29
34
  initializer 'ezlog.configure_rails_middlewares' do |app|
30
35
  app.config.middleware.insert_after ::ActionDispatch::RequestId, Ezlog::Rails::RequestLogContext
31
36
  app.config.middleware.delete ::Rails::Rack::Logger
32
- app.config.middleware.insert_before ::ActionDispatch::DebugExceptions, Ezlog::Rails::AccessLog, Ezlog.logger('AccessLog'), whitelisted_params(app)
37
+ app.config.middleware.insert_before ::ActionDispatch::DebugExceptions, Ezlog::Rails::AccessLog, Ezlog.logger('AccessLog'), config.ezlog
33
38
  app.config.middleware.insert_after ::ActionDispatch::DebugExceptions, Ezlog::Rails::LogExceptions, Ezlog.logger('Application')
34
39
  end
35
40
 
36
41
  config.after_initialize do
37
- Ezlog::Rails::LogSubscriber.detach ::ActionController::LogSubscriber
38
- Ezlog::Rails::LogSubscriber.detach ::ActionView::LogSubscriber
39
- if defined? ::ActiveRecord
40
- Ezlog::Rails::LogSubscriber.detach ::ActiveRecord::LogSubscriber
41
- Ezlog::Rails::LogSubscriber.attach Ezlog::Rails::ActiveRecord::LogSubscriber, :active_record
42
+ case ::Rails::VERSION::MAJOR
43
+ when 6
44
+ ::ActionController::LogSubscriber.detach_from :action_controller
45
+ ::ActionView::LogSubscriber.detach_from :action_view
46
+ if defined? ::ActiveRecord
47
+ ::ActiveRecord::LogSubscriber.detach_from :active_record
48
+ Ezlog::Rails::LogSubscriber.attach Ezlog::Rails::ActiveRecord::LogSubscriber, :active_record
49
+ end
50
+ else
51
+ Ezlog::Rails::LogSubscriber.detach ::ActionController::LogSubscriber
52
+ Ezlog::Rails::LogSubscriber.detach ::ActionView::LogSubscriber
53
+ if defined? ::ActiveRecord
54
+ Ezlog::Rails::LogSubscriber.detach ::ActiveRecord::LogSubscriber
55
+ Ezlog::Rails::LogSubscriber.attach Ezlog::Rails::ActiveRecord::LogSubscriber, :active_record
56
+ end
42
57
  end
43
58
  end
44
59
 
@@ -50,21 +65,18 @@ module Ezlog
50
65
  private
51
66
 
52
67
  def initialize_sidekiq_logging(app)
53
- ::Sidekiq.logger = Ezlog.logger('Sidekiq').extend Ezlog::Sidekiq::LoggerExtension
68
+ ::Sidekiq.logger = Ezlog.logger('Sidekiq')
54
69
  ::Sidekiq.logger.level = app.config.log_level
55
70
  ::Sidekiq.configure_server do |config|
56
71
  config.options[:job_logger] = Ezlog::Sidekiq::JobLogger
57
72
  config.error_handlers << Ezlog::Sidekiq::ErrorLogger.new
58
73
  config.error_handlers.delete_if { |handler| handler.is_a? ::Sidekiq::ExceptionHandler::Logger }
74
+ config.death_handlers << Ezlog::Sidekiq::DeathLogger.new
59
75
  end
60
76
  end
61
77
 
62
78
  def disable_rack_timeout_logging
63
79
  ::Rack::Timeout::Logger.logger = ::Logger.new(nil)
64
80
  end
65
-
66
- def whitelisted_params(app)
67
- app.config.ezlog.log_only_whitelisted_params ? app.config.ezlog.whitelisted_params : nil
68
- end
69
81
  end
70
82
  end
@@ -1,8 +1,8 @@
1
1
  module Ezlog
2
2
  module Sidekiq
3
+ autoload :DeathLogger, 'ezlog/sidekiq/death_logger'
3
4
  autoload :ErrorLogger, 'ezlog/sidekiq/error_logger'
4
5
  autoload :JobContext, 'ezlog/sidekiq/job_context'
5
6
  autoload :JobLogger, 'ezlog/sidekiq/job_logger'
6
- autoload :LoggerExtension, 'ezlog/sidekiq/logger_extension'
7
7
  end
8
8
  end
@@ -0,0 +1,15 @@
1
+ require 'sidekiq'
2
+
3
+ module Ezlog
4
+ module Sidekiq
5
+ class DeathLogger
6
+ include LogContextHelper
7
+
8
+ def call(job, error)
9
+ within_log_context(JobContext.from_job_hash(job)) do
10
+ ::Sidekiq.logger.error error
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -3,13 +3,19 @@ module Ezlog
3
3
  class JobContext
4
4
  class << self
5
5
  def from_job_hash(job_hash)
6
- basic_info_from(job_hash).merge named_arguments_from(job_hash)
6
+ return {} if job_hash.nil?
7
+ thread_info.merge(basic_info_from(job_hash)).merge(named_arguments_from(job_hash))
7
8
  end
8
9
 
9
10
  private
10
11
 
12
+ def thread_info
13
+ { tid: Thread.current['sidekiq_tid'] || (Thread.current.object_id ^ ::Process.pid).to_s(36) }
14
+ end
15
+
16
+
11
17
  def basic_info_from(job)
12
- {
18
+ h = {
13
19
  jid: job['jid'],
14
20
  queue: job['queue'],
15
21
  worker: job_class(job),
@@ -17,6 +23,9 @@ module Ezlog
17
23
  enqueued_at: job['enqueued_at'],
18
24
  run_count: (job['retry_count'] || -1) + 2
19
25
  }
26
+ h[:bid] = job['bid'] if job['bid']
27
+ h[:tags] = job['tags'] if job['tags']
28
+ h
20
29
  end
21
30
 
22
31
  def named_arguments_from(job)
@@ -28,7 +37,7 @@ module Ezlog
28
37
  end
29
38
 
30
39
  def method_parameters_of(job)
31
- Kernel.const_get(job_class(job).to_sym).instance_method(:perform).parameters
40
+ Kernel.const_get(job_class(job)).instance_method(:perform).parameters
32
41
  end
33
42
 
34
43
  def job_class(job)
@@ -1,3 +1,3 @@
1
1
  module Ezlog
2
- VERSION = '0.7.0'
2
+ VERSION = '0.9.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-11 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: oj
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +56,16 @@ dependencies:
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: '10.0'
61
+ version: 12.3.3
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: '10.0'
68
+ version: 12.3.3
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -122,21 +136,17 @@ dependencies:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
138
  version: '5.0'
125
- description:
139
+ description:
126
140
  email:
127
141
  - zoltan.ormandi@emarsys.com
128
142
  executables: []
129
143
  extensions: []
130
144
  extra_rdoc_files: []
131
145
  files:
132
- - ".gitignore"
133
- - ".rspec"
134
- - ".travis.yml"
135
146
  - CHANGELOG.md
136
147
  - Gemfile
137
148
  - LICENSE.txt
138
149
  - README.md
139
- - Rakefile
140
150
  - bin/console
141
151
  - bin/setup
142
152
  - ezlog.gemspec
@@ -156,10 +166,10 @@ files:
156
166
  - lib/ezlog/rspec/helpers.rb
157
167
  - lib/ezlog/rspec/matchers.rb
158
168
  - lib/ezlog/sidekiq.rb
169
+ - lib/ezlog/sidekiq/death_logger.rb
159
170
  - lib/ezlog/sidekiq/error_logger.rb
160
171
  - lib/ezlog/sidekiq/job_context.rb
161
172
  - lib/ezlog/sidekiq/job_logger.rb
162
- - lib/ezlog/sidekiq/logger_extension.rb
163
173
  - lib/ezlog/version.rb
164
174
  - lib/sequel/extensions/ezlog_logging.rb
165
175
  homepage: https://github.com/emartech/ezlog
@@ -167,7 +177,7 @@ licenses:
167
177
  - MIT
168
178
  metadata:
169
179
  changelog_uri: https://github.com/emartech/ezlog/blob/master/CHANGELOG.md
170
- post_install_message:
180
+ post_install_message:
171
181
  rdoc_options: []
172
182
  require_paths:
173
183
  - lib
@@ -182,8 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
192
  - !ruby/object:Gem::Version
183
193
  version: '0'
184
194
  requirements: []
185
- rubygems_version: 3.0.3
186
- signing_key:
195
+ rubygems_version: 3.1.2
196
+ signing_key:
187
197
  specification_version: 4
188
198
  summary: A zero-configuration logging solution for projects using Sidekiq, Rails,
189
199
  Sequel, etc.
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
- .ruby-version
13
- Gemfile.lock
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format progress
2
- --color
3
- --require spec_helper
@@ -1,9 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.4.6
7
- - 2.5.5
8
- - 2.6.3
9
- before_install: gem install bundler -v 2.0.1
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,11 +0,0 @@
1
- module Ezlog
2
- module Sidekiq
3
- module LoggerExtension
4
- include LogContextHelper
5
-
6
- def with_context(context, &block)
7
- within_log_context context, &block
8
- end
9
- end
10
- end
11
- end