lib/legion/logging/methods.rb in legion-logging-1.1.1 vs lib/legion/logging/methods.rb in legion-logging-1.1.2

- old
+ new

@@ -1,13 +1,13 @@ module Legion module Logging module Methods - def trace(raw_message = nil, log = @log, size: @trace_size, log_caller: true) # rubocop:disable Metrics/PerceivedComplexity, Metrics/AbcSize + def trace(raw_message = nil, log = @log, size: @trace_size, log_caller: true) # rubocop:disable Metrics/AbcSize return unless @trace_enabled raw_message = yield if raw_message.nil? && block_given? message = Rainbow('Tracing: ').cyan - message.concat Rainbow(raw_message + ' ').cyan + message.concat Rainbow("#{raw_message} ").cyan if log_caller && size.nil? message.concat Rainbow(caller_locations).cyan.underline elsif log_caller message.concat Rainbow(caller_locations[0..size]).cyan.underline end