Log_level question

Could someone point me to the valid values for log_level? I can’t find
anything but :debug and :info.

I’m trying to turn off logging of the params values. Is that possible?
Or do I have to turn off logging of the request / response altogether?
I assume I could to that pointing the log to /dev/null. Yes?

Thanks,
Bill

On 17-Feb-07, at 4:15 PM, Bill W. wrote:

Could someone point me to the valid values for log_level? I can’t
find anything but :debug and :info.

I’m trying to turn off logging of the params values. Is that
possible? Or do I have to turn off logging of the request /
response altogether? I assume I could to that pointing the log to /
dev/null. Yes?

Thanks,
Bill

This might be a little more than what you’re asking - but the
customizations look to be just the ticket:

http://antrover.com/blog_test/articles/2006/11/29/ruby_and_rails_logging

Cheers,
Jodi
General Partner
The nNovation Group inc.
www.nnovation.ca/blog


Hi Jodi,

Jodi S. wrote:

This might be a little more than what you’re asking

  • but the customizations look to be just the ticket:

http://antrover.com/blog_test/articles/2006/11/29/ruby_and_rails_logging

Thanks much for your reply. I’d read through that already article and
was
hoping there might be another setting for the default logger that I just
didn’t know about. I’m not sure what my hosting service will let me do
wrt
changing the logger.

Best regards,
Bill

Bill:

Could someone point me to the valid values for log_level? I can’t find
anything but :debug and :info.

I’m trying to turn off logging of the params values. Is that possible?

In addition to Jodi’s answer, you might also have a look at
ActionController::Base.filter_parameter_logging method
to filter params values.

See :
http://api.rubyonrails.org/classes/ActionController/Base.html#M000260

Or do I have to turn off logging of the request / response altogether?
I assume I could to that pointing the log to /dev/null. Yes?

Logging is important, you shouldn’t disable it completely imho.

– Jean-François.


Ruby ( http://www.rubyfrance.org ) on Rails ( http://www.railsfrance.org
)

Hi Jean-François;

Jean-François Trân wrote:

In addition to Jodi’s answer, you might also have a look at
ActionController::Base.filter_parameter_logging method
to filter params values.

Thank you very much for that. I hadn’t discovered that method before
and,
with a little experimenting, it may be just the thing. I really don’t
want
to turn off logging; just get rid of the params values in the log.

Best regards,
Bill

My bad on two counts. 1) the logger is in Ruby, not Rails. 2) the
article
had a link to the Ruby doc on logger. The answer my question about
valid
logging levels is at http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/

hth someone in the future.

Bill

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs