views:

103

answers:

1

Whenever I try

logger.info ("REQUEST: \n " + request.to_yaml)

I get this error:

can't dump anonymous class Class

What's the best way to see what's in the request object (in a readable way)?

+3  A: 
logger.info ("REQUEST: \n " + request.inspect)
jdl
`inspect` munges everything together on one line -- it's impossible to see what's going on
Horace Loeb
I guess I'm just used to reading it that way. The problem you are running into is that not every Class defines to_yaml, and specifically "Class" in the error you're seeing.You could be more specific though. Is there a reason you need to see the entire request object, and not just some subset of its attributes?
jdl