Hey there list dwellers- Is there any way to quiet the production.log down a bit? I''m getting around 40,000 hits a day and the log is just ridiculous. Especially since each page also renders multiple components. So each hit generate like 20 or more lines in the production.log. How can I shut it up? Or at least make it not so talkative? Thanks- -Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
Ezra Zygmuntowicz wrote:> Is there any way to quiet the production.log down a bit?you can set the default logger level modifying the following line in the environment.rb file: RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? Logger::INFO : Logger::DEBUG) Setting a level in the logger makes the system output only the messages with lower o equal level (ths levels are DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN ) Thus if you put Logger::FATAL instead of Logger::INFO Rails will write to the logfile only the errors with level FATAL. HTH Luca
Ezra Zygmuntowicz wrote:> Is there any way to quiet the production.log down a bit?you can set the default logger level modifying the following line in the environment.rb file: RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? Logger::INFO : Logger::DEBUG) Setting a level in the logger makes the system output only the messages with lower o equal level (ths levels are DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN ) Thus if you put Logger::FATAL instead of Logger::INFO Rails will write to the logfile only the errors with level FATAL. HTH Luca
http://wiki.rubyonrails.com/rails/show/HowtoConfigureLogging has some excellent info on this. Basically, you can just set RAILS_DEFAULT_LOGGER.level = Logger::FATAL in the environments/production.rb and you''ll get much less verbose logging. -- Justin Dossey On Fri, 26 Aug 2005, Ezra Zygmuntowicz wrote:> Hey there list dwellers- > Is there any way to quiet the production.log down a bit? I''m getting > around 40,000 hits a day and the log is just ridiculous. Especially since > each page also renders multiple components. So each hit generate like 20 > or more lines in the production.log. How can I shut it up? Or at least > make it not so talkative? > > Thanks- > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > 509-577-7732 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 8/27/05, Ezra Zygmuntowicz <ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote:> > Is there any way to quiet the production.log down a bit?you can set the default logger level modifying the following line in the environment.rb file: RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? Logger::INFO : Logger::DEBUG) Setting a level in the logger makes the system output only the messages with lower o equal level (ths levels are DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN ) Thus if you put Logger::FATAL instead of Logger::INFO Rails will write to the logfile only the errors with level FATAL. HTH Luca (sorry if this mail gets through more than once, but i tried before without results) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Thank you Luca- -Ezra On Aug 27, 2005, at 8:32 AM, Luca Mearelli wrote:> > > On 8/27/05, Ezra Zygmuntowicz <ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote: > Is there any way to quiet the production.log down a bit? > > you can set the default logger level modifying the following line > in the environment.rb file: > > RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? > Logger::INFO : Logger::DEBUG) > > Setting a level in the logger makes the system output only the > messages with lower o equal level (ths levels are DEBUG < INFO < > WARN < ERROR < FATAL < UNKNOWN ) > Thus if you put Logger::FATAL instead of Logger::INFO Rails will > write to the logfile only the errors with level FATAL. > > HTH > Luca > > (sorry if this mail gets through more than once, but i tried before > without results) > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails