Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can oink be used with Sinatra? #19

Open
erikrob opened this issue Nov 5, 2012 · 5 comments
Open

Can oink be used with Sinatra? #19

erikrob opened this issue Nov 5, 2012 · 5 comments

Comments

@erikrob
Copy link

erikrob commented Nov 5, 2012

From what I read it seems highly coupled with Rails but was wondering if anyone ever attempted/managed to use it with Sinatra?

@noahd1
Copy link
Owner

noahd1 commented Nov 5, 2012

It used to be pretty coupled with Rails when it used controller filters. But now it uses Middleware and activerecord hooks, so you should be able to use it just fine with Sinatra. Let me know if you run into any trouble.

@nathany
Copy link

nathany commented Jan 11, 2013

Any plans to split off the ActiveRecord dependencies as some sort of plugin?

@noahd1
Copy link
Owner

noahd1 commented Jan 11, 2013

No plans, but seems like a sensible idea. In the very least, oink should not blow up if you've only configured the middleware to log memory footprints (and not AR instances). Can you confirm that is the case, and if so, open up an issue about it?

@nathany
Copy link

nathany commented Jan 11, 2013

I can confirm that it works fine in this case (with a NestaCMS/Sinatra app). I'm not 100% sure whether or not AR is loaded/impacting the memory footprint.

@kakubei
Copy link

kakubei commented Nov 13, 2013

Could someone tell me how to set it up with Padrino (Sinatra based) and Heroku please?

I have installed it locally and set it up in app/app.rb as such:

  use Oink::Middleware do
    set :logger => Hodel3000CompliantLogger.new(STDOUT)
  end

Did some work loally in development mode, then tried to see something in the logs with:

oink --format verbose --threshold=0 log/development.log
or
oink --format verbose --threshold=1 log/development.log

But it was empty.

On Heroku, I got this error while trying to startup the app:

Rack app error: #<Errno::ENOENT: No such file or directory - log/oink.log>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants