dldinternet-mixlib-logging 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/dldinternet/mixlib/logging.rb +5 -5
- data/lib/dldinternet/mixlib/logging/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTIzNTYxZTA1NTBiODIxNzc3ZTMyNDJjYTA1NDU0MjRkYWQ5OTAyOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGFjMzlmMDVkNmM0YzM5NTczODVhYTE1YzRlYzQxZTAyNTQyODZhMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWViMDIxNTQ3MjJhYWZlNWYwOTBjZTM3NzBiYmZkNmI4ODA1ZDNkZjFkODEz
|
10
|
+
Y2Y3YzdmZGU1OTNlNTYxOTFjMjEyNzAyMjRkZGRhNGRlNmJhYTMyZGVjMzFm
|
11
|
+
MWI2ZjA4NTc3M2ZjMjExNmQ4OWYyMzhhOGFmYzU5ZWE4ZTIyNWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzJlNDAwNzRkYzUxNTIzZTJjOGJhNGQwNWI3ZTI5MjkwOGQ2Y2JiODA4NjFm
|
14
|
+
YWMyZjJjMWJjZDc0ZDAyMzVkZGU1YTRkYThjZWVkZTlmY2JhNDdlNTM4MDYx
|
15
|
+
NzBkMWI0NDBkYWI0ZGI4NTY0YjhmYzA2MmQ2YjAwMzA0ZmQwNGQ=
|
@@ -133,18 +133,19 @@ unless defined? ::DLDInternet::Mixlib::Logging::ClassMethods
|
|
133
133
|
line = Integer(match[2])
|
134
134
|
modl = match[3] unless match[3].nil?
|
135
135
|
|
136
|
+
# Unless we've already logged this TODO ...
|
136
137
|
unless @TODO["#{file}::#{line}"]
|
137
138
|
le = ::Logging::LogEvent.new(@logger, ::Logging::LEVELS['todo'], msg, false)
|
138
139
|
@logger.logEvent(le)
|
139
|
-
@TODO["#{file}::#{line}"] =
|
140
|
+
@TODO["#{file}::#{line}"] = msg
|
140
141
|
end
|
141
142
|
end
|
142
143
|
|
143
144
|
# -----------------------------------------------------------------------------
|
144
|
-
def logStep(msg)
|
145
|
+
def logStep(msg,cat='Step')
|
145
146
|
logger = getLogger(@logger_args, 'logStep')
|
146
147
|
if logger
|
147
|
-
logger.step "
|
148
|
+
logger.step "#{cat} #{@step+=1}: #{msg} ..."
|
148
149
|
end
|
149
150
|
end
|
150
151
|
|
@@ -176,8 +177,7 @@ unless defined? ::DLDInternet::Mixlib::Logging::ClassMethods
|
|
176
177
|
begin
|
177
178
|
::Logging.init :trace, :debug, :info, :step, :warn, :error, :fatal, :todo unless defined? ::Logging::MAX_LEVEL_LENGTH
|
178
179
|
if args[:origins] and args[:origins][:log_level]
|
179
|
-
if
|
180
|
-
#puts "#{args[:log_level].to_s} = #{::Logging::LEVELS[args[:log_level].to_s]}".light_yellow
|
180
|
+
if ::Logging::LEVELS[args[:log_level].to_s] and ::Logging::LEVELS[args[:log_level].to_s] < 2
|
181
181
|
puts "#{args[:origins][:log_level]} says #{args[:log_level]}".light_yellow
|
182
182
|
else
|
183
183
|
from = ''
|