0.01
No release in over a year
Get better visibility of what happen on your server with logs directly in Chrome
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 5.0.0
 Project Readme

Railsochrome

RailsJazz Listed on OpenSource-Heroes.com

Project was created just for fun and out of curiosity.

The idea of this project is to print log messages from the Rails app in a Chrome console. It will work even if you have a simple JSON API call.

What is funny, is that it can log messages from the models. Just call a class method Railsochrome.log.

How it works see on the diagram below:

image

Usage

  1. Clone the repo

  2. Install chrome extension from the source code.

image

  1. Add gem and use in your code:
  # controller
  def index
    Railsochrome.log("Opening index action")
    Railsochrome.log("user_id = #{rand(111)}")
    Railsochrome.log("account_id = #{rand(111)}")

    @projects = Project.all
  end

  # model
  class Project < ApplicationRecord
    after_initialize do
      Railsochrome.log("after_initialize project id=#{self.id}")
    end
  end
  1. Result:

image

Installation

gem "railsochrome"

And then execute:

$ bundle

Or install it yourself as:

$ gem install railsochrome

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.