But I'd really rather use Logger and have control over file size,
rotation, level, etc.
Any suggestions...?
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
sorry, that was a bug in my rakefile, not splitting #exec args enough.
> It still doesn't capture the web server log messages. I mean the entries
> that look like this:
>
> 127.0.0.1 - - [06/Apr/2009 20:51:17] "GET
> /speedinfo?lat=37.865571&lng=-122.303066 HTTP/1.1" 200 1251 0.0042
>
> These go to stdout, which of course I can redirect, but I'd rather have
> control over log size, rotation, etc.
Still can't find how to capture this. I guess that's more of a rack
question?
In rackcommonlogger.rb, it's possible to specify a logger when the
CommonLogger is instantiated:
class CommonLogger
def initialize(app, logger=nil)
but it's not clear how to specify this from a sinatra app.
Surely, someone has needed to do this before? Web server log messages
will otherwise fill some file to infinity....
That's perfect, with the substitution of a Logger instance:
configure :production do
set :logging, false
LOGGER = Logger.new(...)
use Rack::CommonLogger, LOGGER
end
Thanks!