tlogger 0.26.1 → 0.26.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -1
- data/lib/tlogger/version.rb +1 -1
- data/lib/tlogger_helper.rb +12 -14
- data/tlogger.gemspec +3 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f999c21a9d4ba07f90d307edfec87eda42b4b72ee8b40b1c03ebb5996f14562
|
4
|
+
data.tar.gz: bd8a18877d7057263befec0cc93a939259bca1ab8c6084365d3bd055b732e489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '092162f6c93adbfbff4cc3bbc1af619d10159be08960a23f352becbbb3038297ff5d67ed65a841d33b289bef62839ed7f1b270666be6e82f7d926c0ebcc868b8'
|
7
|
+
data.tar.gz: 549e00b20bfa3ab36fcf01b68e54542d36df127bb84377c6c909d27f75b3bbec27e5446552bf37861071faa7d77829ac10a9bd24f793c2e2db7dc90a4a129e4f
|
data/Rakefile
CHANGED
data/lib/tlogger/version.rb
CHANGED
data/lib/tlogger_helper.rb
CHANGED
@@ -4,32 +4,30 @@ require_relative 'tlogger'
|
|
4
4
|
module Tlogger
|
5
5
|
module TloggerHelper
|
6
6
|
|
7
|
-
module
|
8
|
-
def tlogger(
|
7
|
+
module ClassMethods
|
8
|
+
def tlogger(opts = { })
|
9
|
+
defOpts = { tag: nil, dev_mode: false }.merge!(opts)
|
10
|
+
|
9
11
|
if @tlogger.nil?
|
10
12
|
@tlogger = ::Tlogger.init
|
11
|
-
|
13
|
+
::Tlogger.set_dev_mode if defOps[:dev_mode] == true
|
14
|
+
@tlogger.tag = tag if not (defOpts[:tag].nil? and defOps[:tag].empty?)
|
12
15
|
end
|
13
16
|
@tlogger
|
14
17
|
end
|
15
18
|
|
16
|
-
def default_logger(tag, dev_mode = false)
|
17
|
-
::Tlogger.set_dev_mode if dev_mode
|
18
|
-
tlogger(tag)
|
19
|
-
end
|
20
19
|
end
|
21
20
|
|
22
21
|
def self.included(klass)
|
23
|
-
klass.extend(
|
22
|
+
klass.extend(ClassMethods)
|
24
23
|
end
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
if not respond_to?(:logger)
|
29
|
-
def logger
|
30
|
-
self.class.tlogger
|
31
|
-
end
|
25
|
+
def tlogger
|
26
|
+
self.class.tlogger
|
32
27
|
end
|
33
28
|
|
34
29
|
end
|
35
30
|
end
|
31
|
+
|
32
|
+
TloggerHelper = Tlogger::TloggerHelper
|
33
|
+
|
data/tlogger.gemspec
CHANGED
@@ -28,5 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_development_dependency "devops_helper"
|
31
|
+
#spec.add_development_dependency "devops_helper"
|
32
|
+
spec.add_development_dependency "devops_assist"
|
33
|
+
|
32
34
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tlogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: devops_assist
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -54,7 +54,7 @@ licenses:
|
|
54
54
|
- MIT
|
55
55
|
metadata:
|
56
56
|
homepage_uri: https://github.com/chrisliaw/tlogger
|
57
|
-
post_install_message:
|
57
|
+
post_install_message:
|
58
58
|
rdoc_options: []
|
59
59
|
require_paths:
|
60
60
|
- lib
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubygems_version: 3.2.22
|
73
|
-
signing_key:
|
73
|
+
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Logger that added contextual information to the log messages
|
76
76
|
test_files: []
|