logcraft 2.2 → 2.2.1

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: f83b1cb57e7d3a8072d8fc2d7b5b7d952cd9f96eb72edecb88244179384d4f61
4
- data.tar.gz: 2f679955495954defc5ba217f0ef36318f0fae6e8d050c48b834c582b8742ff8
3
+ metadata.gz: 11f0babfb031a9f5e674f01b83410ceb62d31f13463bfe1df0e9ec6f4c597e93
4
+ data.tar.gz: '0167095c07490ce2200fc5fa84c938024bbb1b94f4dd11d2ea327ae009877521'
5
5
  SHA512:
6
- metadata.gz: ad933459ec43e29bcf9c13627d591ded635601e1a2df160c7178c98abadb5f103bacdd3b160d5ab7900b83fa0b254d701be6eaeb7e1277dfc211a76303f4b376
7
- data.tar.gz: a1693794447ab3fc3180c9aa905d397fd4ae7f4e23fe7474d7c7817cfef8acecf41935db8f4a1589ee691133af7186d486d60a7df432ff02230a089483010fcf
6
+ metadata.gz: 10513e0f20f07722672a14c4f15592a5825819ceed8af5ea3c752d2ff03c90f993e651e005f4cc8ab936869e795d26b046467e70cbdec9874f3e8b902229e132
7
+ data.tar.gz: 4f8c49167da207acbf3c3a780defa2ea1cd8f6f1acc6acc69774df2e654426833e3664f321e51e28de901d9278131c78a97d7a85cf16893131795ec16fea16e9
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.2.1] - 2023-12-19
8
+ ### Fixed
9
+ - Fixed an issue where logs were duplicated (once in JSON, once in plain text) when running the Rails console.
10
+ (https://github.com/zormandi/logcraft/issues/7)
11
+ - Fixed an issue that prevented using Logcraft and Sentry-Rails together with the default configuration.
12
+ (https://github.com/zormandi/logcraft/issues/6)
13
+
7
14
  ## [2.2] - 2023-10-23
8
15
  ### Added
9
16
  - Added support for Rails 7.1.
data/README.md CHANGED
@@ -18,7 +18,6 @@ Logcraft supports:
18
18
 
19
19
  * [Ruby](https://www.ruby-lang.org) 2.6 and up (tested with 2.6, 2.7, 3.0 and 3.1)
20
20
  * [Rails](https://rubyonrails.org/) 5 and up (tested with 5.2, 6.0, 6.1, 7.0 and 7.1)
21
- * [Rails](https://rubyonrails.org/) 5 and up (tested with 5.2, 6.0, 6.1 and 7.0)
22
21
  * [Sidekiq](https://github.com/mperham/sidekiq) integration is provided via
23
22
  the [Logcraft::Sidekiq](https://github.com/zormandi/logcraft-sidekiq) gem
24
23
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Logcraft
4
- VERSION = "2.2"
4
+ VERSION = "2.2.1"
5
5
  end
data/lib/logcraft.rb CHANGED
@@ -18,6 +18,14 @@ module Logcraft
18
18
  end
19
19
 
20
20
  def self.logger(name, level = nil)
21
- Logging::Logger[name].tap { |logger| logger.level = level if level }
21
+ Logging::Logger[name].tap do |logger|
22
+ logger.level = level if level
23
+ logger.instance_variable_set :@logdev, OpenStruct.new(dev: STDOUT)
24
+ logger.define_singleton_method :dup do
25
+ super().tap do |logger_copy|
26
+ Logging::Logger.define_log_methods logger_copy
27
+ end
28
+ end
29
+ end
22
30
  end
23
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logcraft
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2023-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging