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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cf3256d26a571615fe3121d443904dcbeb8cf54ea1761a1d52704d36f5a9418
4
- data.tar.gz: e0c620dca8f28c1f2177bd4e460c68b43bd4a31be6906cf304423240481a59b9
3
+ metadata.gz: b4232ba1eb83e3cd042ea70c67272fb9598b74d0b295494a9ee540b3c6491c92
4
+ data.tar.gz: e6c805f3229fe09d4a2b1bf1b9d18e1a0bcd243ae2839eaa096664dba2a3bcbb
5
5
  SHA512:
6
- metadata.gz: 26a1ecb562014272126bcbe5669ca7e6cee341d93f1c0bca7f52a85f099f60d7e8f5557001ad032ce00379f295ec14a749242020f7b5e9797c4bc25ee28b7f28
7
- data.tar.gz: b22ed97e724d855d993533cd5062920c85934358e2e1e62fb691d81e4045c28e2335a93f3b8c7c83dd3646dffb985b3e9bc89abd897ef5f6ee5966565c86c4e8
6
+ metadata.gz: 5860e1862e58902dc358529e35891900e377fc0055bd8ed9fc9dfe653c49d2f719f8e507705e9372b462678979595c00bd607298cdfe296b6d3d2d14b63ba268
7
+ data.tar.gz: 3dc82d00fb68f8baf5d9d4115be52c8bca5b841768178fb036889873020b9ea559acf3b5da076692872865fb963eee39a9c72351eb9df975e45bc8d51281bedb
@@ -1,3 +1,3 @@
1
1
  module Tlogger
2
- VERSION = "0.25.0"
2
+ VERSION = "0.25.1"
3
3
  end
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
- private
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.0
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-01-17 00:00:00.000000000 Z
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.1.2
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