summaryrefslogtreecommitdiff
path: root/qa/qa/resource/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/base.rb')
-rw-r--r--qa/qa/resource/base.rb21
1 files changed, 10 insertions, 11 deletions
diff --git a/qa/qa/resource/base.rb b/qa/qa/resource/base.rb
index ca0087cf709..2848e3ba7d2 100644
--- a/qa/qa/resource/base.rb
+++ b/qa/qa/resource/base.rb
@@ -75,19 +75,18 @@ module QA
end
def log_fabrication(method, resource, parents, args)
- return yield unless Runtime::Env.debug?
-
start = Time.now
- prefix = "==#{'=' * parents.size}>"
- msg = [prefix]
- msg << "Built a #{name}"
- msg << "as a dependency of #{parents.last}" if parents.any?
- msg << "via #{method}"
yield.tap do
- msg << "in #{Time.now - start} seconds"
- puts msg.join(' ')
- puts if parents.empty?
+ Runtime::Logger.debug do
+ msg = ["==#{'=' * parents.size}>"]
+ msg << "Built a #{name}"
+ msg << "as a dependency of #{parents.last}" if parents.any?
+ msg << "via #{method}"
+ msg << "in #{Time.now - start} seconds"
+
+ msg.join(' ')
+ end
end
end
@@ -189,7 +188,7 @@ module QA
end
def log_having_both_api_result_and_block(name, api_value)
- QA::Runtime::Logger.info(<<~MSG.strip)
+ QA::Runtime::Logger.debug(<<~MSG.strip)
<#{self.class}> Attribute #{name.inspect} has both API response `#{api_value}` and a block. API response will be picked. Block will be ignored.
MSG
end