unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [Rails 3] Unicorn log output
@ 2010-07-06  8:20 Mark Davidson
  2010-07-06  9:06 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Davidson @ 2010-07-06  8:20 UTC (permalink / raw)
  To: mongrel-unicorn

I'm just getting started with Rails 3 but noticed that unicorn doesn't
tail the development log which makes sense since its not specifically
for rails. I got the development log back using Rails::Rack::LogTailer
and got rid of the Rack request log by setting `stderr_path` to
/dev/null in the unicorn config file. That basically gives me the same
behavior as unicorn_rails on 2.3.8.

Is there a better or preferred way of doing this? Can Rack's default
request log be disabled? I wonder why it goes to stderr anyway, cause
the request log isn't exactly an error?

Cheers.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Rails 3] Unicorn log output
  2010-07-06  8:20 [Rails 3] Unicorn log output Mark Davidson
@ 2010-07-06  9:06 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2010-07-06  9:06 UTC (permalink / raw)
  To: unicorn list; +Cc: Mark Davidson

Mark Davidson <chemosh9@gmail.com> wrote:
> I'm just getting started with Rails 3 but noticed that unicorn doesn't
> tail the development log which makes sense since its not specifically
> for rails. I got the development log back using Rails::Rack::LogTailer
> and got rid of the Rack request log by setting `stderr_path` to
> /dev/null in the unicorn config file. That basically gives me the same
> behavior as unicorn_rails on 2.3.8.
> 
> Is there a better or preferred way of doing this? Can Rack's default
> request log be disabled? I wonder why it goes to stderr anyway, cause
> the request log isn't exactly an error?

Hi Mark,

You can pass "-E none" or set "RACK_ENV=none" in the environment to
disable the default middleware 'unicorn' gives you.

'unicorn' tries to follow the 'rackup' command as closely as possible to
ease transitions, so it will send Rack::CommonLogger output to $stderr
when RACK_ENV is 'none' or 'deployment' just like 'rackup' does.

On the subject of request logging, I prefer to use Clogger
(http://clogger.rubyforge.org/) for the few deployments I do instead of
Rack::CommonLogger since Clogger is configurable and (under MRI) faster
(I also wrote it, so if it breaks I get to fix it :>).

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-06  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-06  8:20 [Rails 3] Unicorn log output Mark Davidson
2010-07-06  9:06 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).