Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Unfortunately I can't comment yet but in case someone else has this issue a few things seem to have changed since Gabe Coyne's (super helpful) answer above. I didn't need to change my heroku log_level, so to start generating the logs you can just use an initializer <code>config/initializers/oink.rb</code> like so:</p> <pre><code>YourApp::Application.middleware.use( Oink::Middleware, :logger =&gt; Hodel3000CompliantLogger.new(STDOUT)) </code></pre> <p>Or put that line in <code>production.rb</code> if you only want the oink logs in production. Then you need to get the logs into a local log file, also mentioned in the previous answer:</p> <pre><code>heroku logs n500 --app app_name &gt; log/production.log </code></pre> <p>Or you can grab them from Papertrail or your favorite log archiver. The local logs need to be updated to the format that oink expects, but I found that <code>grep 'Oink|Memory|Instantiation'</code> didn't work as that string seems to have been removed from the logs, so I used this instead:</p> <pre><code>cat log/production.log | cut -c 46- | grep 'rails\[' &gt; log/production-oink.log </code></pre> <p>Then you can use <code>oink --threshold=0 log/production-oink.log</code> and it will work. </p> <p>The only other thing that caught me up was the number of preceding characters to cut. Whereas <code>cut -c 39-</code> seems to have worked before, I had to use <code>cut -c 46-</code>. Obviously this varies, so in case its not obvious, you are just trying to get the lines in the raw logs that look like this:</p> <pre><code>2013-07-19T18:47:09.494475+00:00 app[web.1]: Jul 19 18:47:09 24ab5d5s-g46c-2d44-dss2-233sdfa99852wd rails[5]: Oink Action: welcome#about </code></pre> <p>To look like this:</p> <pre><code>Jul 19 18:47:09 24ab5d5s-g46c-2d44-dss2-233sdfa99852wd rails[5]: Oink Action: welcome#about </code></pre> <p>With the front part removed. Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload