Open erikrob opened 11 years ago
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.
Any plans to split off the ActiveRecord dependencies as some sort of plugin?
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?
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.
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>
From what I read it seems highly coupled with Rails but was wondering if anyone ever attempted/managed to use it with Sinatra?