edge badge
Methods
L
S
Instance Public methods
logger()
# File activestorage/lib/active_storage/log_subscriber.rb, line 32
def logger
  ActiveStorage.logger
end
service_delete(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 16
def service_delete(event)
  info event, color("Deleted file from key: #{key_in(event)}", RED)
end
service_delete_prefixed(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 20
def service_delete_prefixed(event)
  info event, color("Deleted files by key prefix: #{event.payload[:prefix]}", RED)
end
service_download(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 12
def service_download(event)
  info event, color("Downloaded file from key: #{key_in(event)}", BLUE)
end
service_exist(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 24
def service_exist(event)
  debug event, color("Checked if file exists at key: #{key_in(event)} (#{event.payload[:exist] ? "yes" : "no"})", BLUE)
end
service_upload(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 6
def service_upload(event)
  message = "Uploaded file to key: #{key_in(event)}"
  message += " (checksum: #{event.payload[:checksum]})" if event.payload[:checksum]
  info event, color(message, GREEN)
end
service_url(event)
# File activestorage/lib/active_storage/log_subscriber.rb, line 28
def service_url(event)
  debug event, color("Generated URL for file at key: #{key_in(event)} (#{event.payload[:url]})", BLUE)
end