Browse Source

stackisize symbol:

main
pvincent 2 months ago
parent
commit
6fcdf2d22f
  1. 4
      lib/semantic/helper.rb
  2. 2
      lib/semantic/subscribers/action_view.rb

4
lib/semantic/helper.rb

@ -3,12 +3,12 @@ module Semantic
module Helper
class << self
include AnsiColors
def stackisize(*items)
def stackisize(*items, symbol: '➟')
return if items.empty?
Rails.backtrace_cleaner
.clean(items)
.map { |item| ansi_trace(item, '➟') }
.map { |item| ansi_trace(item, symbol) }
.join("\n")
end

2
lib/semantic/subscribers/action_view.rb

@ -64,7 +64,7 @@ module Semantic
partial_savings.each do |partial, saving|
count_info = " (#{saving[:count]} times)" if saving[:count] > 1
logger.debug("Rendered partial #{partial}#{count_info}")
logger.debug(Semantic::Helper.stackisize(saving[:first_origin]))
logger.debug(Semantic::Helper.stackisize(saving[:first_origin], symbol: '⇤'))
end
end

Loading…
Cancel
Save