Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tasdikrahman/88a9a18b009d1e4ec10f3a3bc0eee086 to your computer and use it in GitHub Desktop.

Select an option

Save tasdikrahman/88a9a18b009d1e4ec10f3a3bc0eee086 to your computer and use it in GitHub Desktop.

Revisions

  1. tasdikrahman created this gist Jul 9, 2020.
    7 changes: 7 additions & 0 deletions example_controller_with_rails_logger.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # app/controllers/health_check_controller.rb
    class HealthCheckController < ActionController::Base
    def ping
    Rails.logger.info("bazbar, request-id: #{request.request_id}")
    render json: { success: true, errors: nil, data: 'pong' }, status: :ok
    end
    end