Debug output cannot be disabled #14

martinstreicher opened this Issue Nov 20, 2012 · 4 comments


None yet

4 participants


The gem seemingly always creates a logger. On a busy API server, the log quickly grew due to four lines of text each request.

dsjoerg commented Nov 26, 2012

+1, I've been struggling with the same nonsense. It doesnt always create a logger, it will use the one in env['rack.logger'] if it exists, as it will if you're using unicorn.

If you can manage to throw this line into your unicorn.conf, then the log.debug() calls won't clutter up your logfile:

logger$stderr).tap{|logger| logger.level = Logger::INFO}
fx commented Nov 28, 2012

To stop it from using the unicorn-assigned rack.logger or creating a new one, simply tell Rack::Cors to use a different logger via the logger option:

cyu commented Nov 28, 2012

@fx: Great point - that's probably the best way to get around this right now. I plan on putting some time in an knocking out some issues. I'll get this addressed in the next release.

@cyu cyu was assigned Dec 9, 2012
cyu commented Dec 9, 2012

Add :debug option which will disable debug logging

@cyu cyu closed this Dec 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment