simple_structured_logger 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_structured_logger.rb +4 -0
- data/simple_structured_logger.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 959e1a8479e4536b7c1a97cca00e409b4d979e611a5da6a214311cb33a877070
|
4
|
+
data.tar.gz: 555fd1aa0f22f2470b65e724bdaf861d1f28ece8fd5d9decf8579bd7bcd4d7b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87bc3367c2993374dbb3c2220a6d9378cfecaf0480901e26f305850b75c7584ea7a90cbe8c1c9bc831802e07456bf50a250a03a0cb2634faa926e6f9523e770f
|
7
|
+
data.tar.gz: '0489971ce5a5d82e1a9b3327510a322796ba4b02014300f286502df17923bfe35de572d272119647a32edcd97798409ef68be0ea8fe62d1e93c033758a0633f5'
|
@@ -58,11 +58,15 @@ module SimpleStructuredLogger
|
|
58
58
|
set_log_level_from_environment
|
59
59
|
end
|
60
60
|
|
61
|
+
# returns true if log level is set from env
|
61
62
|
def set_log_level_from_environment
|
62
63
|
env_log_level = ENV['LOG_LEVEL']
|
63
64
|
|
64
65
|
if !env_log_level.nil? && Logger::Severity.const_defined?(env_log_level.upcase)
|
65
66
|
@logger.level = Logger::Severity.const_get(env_log_level.upcase)
|
67
|
+
true
|
68
|
+
else
|
69
|
+
false
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "simple_structured_logger"
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.1'
|
8
8
|
spec.authors = ["Michael Bianco"]
|
9
9
|
spec.email = ["mike@mikebian.co"]
|
10
10
|
spec.licenses = ['MIT']
|