sapience 0.2.14 → 0.2.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a3c771abd2e88f511482cca40e22316546ac350
|
4
|
+
data.tar.gz: 4824530441051a9ff6a0d7022c3a20d2d9b73bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7184df137b7d097a8cca5e4b6950853ca85767a976d77c17d9d18749cf0864a04abaa10511cfad37cf4b3239bc5007d5222e76d66d49055c5be88e2737e2707
|
7
|
+
data.tar.gz: 0ab885e9083eac441c5d56be9bf2a01597bf9a39c1ed12792df319498d301dddca66058d9836becf499620101238c6ae16a1c556b57ef139945ae07b3f580909
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,7 @@ module Sapience
|
|
4
4
|
module Rails
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
6
|
config.before_configuration do
|
7
|
-
Sapience.add_appender(:stream, io: STDOUT, level: :warn, formatter: :color)
|
7
|
+
Sapience.add_appender(:stream, io: STDOUT, level: :warn, formatter: :color) if Sapience.appenders.empty?
|
8
8
|
::Rails.logger = Sapience[::Rails]
|
9
9
|
end
|
10
10
|
end
|
data/lib/sapience/sapience.rb
CHANGED
@@ -21,7 +21,7 @@ require "English"
|
|
21
21
|
# rubocop:disable ClassVars
|
22
22
|
module Sapience
|
23
23
|
UnknownClass = Class.new(NameError)
|
24
|
-
@@configured =
|
24
|
+
@@configured = false
|
25
25
|
|
26
26
|
# Logging levels in order of most detailed to most severe
|
27
27
|
LEVELS = [:trace, :debug, :info, :warn, :error, :fatal].freeze
|
@@ -52,7 +52,7 @@ module Sapience
|
|
52
52
|
@@config = nil
|
53
53
|
@@logger = nil
|
54
54
|
@@metrix = nil
|
55
|
-
@@configured =
|
55
|
+
@@configured = false
|
56
56
|
clear_tags!
|
57
57
|
reset_appenders!
|
58
58
|
end
|
@@ -79,6 +79,7 @@ module Sapience
|
|
79
79
|
def self.configure(force: false)
|
80
80
|
yield config if block_given?
|
81
81
|
return config if configured? && force == false
|
82
|
+
reset_appenders!
|
82
83
|
add_appenders(*config.appenders)
|
83
84
|
@@configured = true
|
84
85
|
|
data/lib/sapience/version.rb
CHANGED