tlogger 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tlogger/version.rb +1 -1
- data/lib/tlogger.rb +10 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4232ba1eb83e3cd042ea70c67272fb9598b74d0b295494a9ee540b3c6491c92
|
4
|
+
data.tar.gz: e6c805f3229fe09d4a2b1bf1b9d18e1a0bcd243ae2839eaa096664dba2a3bcbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5860e1862e58902dc358529e35891900e377fc0055bd8ed9fc9dfe653c49d2f719f8e507705e9372b462678979595c00bd607298cdfe296b6d3d2d14b63ba268
|
7
|
+
data.tar.gz: 3dc82d00fb68f8baf5d9d4115be52c8bca5b841768178fb036889873020b9ea559acf3b5da076692872865fb963eee39a9c72351eb9df975e45bc8d51281bedb
|
data/lib/tlogger/version.rb
CHANGED
data/lib/tlogger.rb
CHANGED
@@ -8,7 +8,7 @@ require_relative "tlogger/logger_group"
|
|
8
8
|
#
|
9
9
|
module Tlogger
|
10
10
|
class Error < StandardError; end
|
11
|
-
|
11
|
+
|
12
12
|
# shorten the initializer to Tlogger.new instead of the longer Tlogger::Tlogger.new
|
13
13
|
class << self
|
14
14
|
def new(*args,&block)
|
@@ -25,11 +25,19 @@ module Tlogger
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
def set_dev_mode
|
29
|
+
ENV["TLOGGER_MODE"] = "dev"
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_production_mode
|
33
|
+
ENV.delete("TLOGGER_MODE")
|
34
|
+
end
|
35
|
+
|
29
36
|
def is_dev?
|
30
37
|
ENV.keys.include?("TLOGGER_MODE") and ENV["TLOGGER_MODE"].downcase == "dev"
|
31
38
|
end
|
32
39
|
|
40
|
+
private
|
33
41
|
def output_channel
|
34
42
|
out = ENV["TLOGGER_OUT"]
|
35
43
|
if not out.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tlogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devops_helper
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
71
|
+
rubygems_version: 3.2.22
|
72
72
|
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Logger that added contextual information to the log messages
|