Skipping log messages for static assets?

15 views
Skip to first unread message

Jacques Crocker

unread,
Apr 10, 2011, 3:06:10 PM4/10/11
to pad...@googlegroups.com
Is it possible to have Padrino skip showing logging messages whenever it shows a static assets (image, js, css)?

From looking at padrino-core/logger.rb, it doesn't seem like it. Maybe it would make sense to have a setting that skips log messages if rack.env['sinatra.static_file'] is detected?



Jacques Crocker

unread,
Apr 10, 2011, 3:39:34 PM4/10/11
to pad...@googlegroups.com
I added a log_static option to Padrino.logger here. Pull request here:
https://github.com/padrino/padrino-framework/pull/466

By default its false which means static assets won't show up in logs. To turn it on you can add this setting to boot.rb:

Padrino::Logger::Config[:development][:log_static] = true

Reply all
Reply to author
Forward
0 new messages