Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML dump for call #3

Closed
evaneykelen opened this issue Dec 22, 2011 · 6 comments
Closed

XML dump for call #3

evaneykelen opened this issue Dec 22, 2011 · 6 comments

Comments

@evaneykelen
Copy link

It'd be great if you could somehow dump the XML generated for a call. Not a biggie, just a nice debugging feature.

@cice
Copy link
Contributor

cice commented Dec 22, 2011

i'll get on it!

@cice
Copy link
Contributor

cice commented Dec 30, 2011

hey @evaneykelen
i just pushed 0.0.6.RC2 with logging features. (details here and on rubygems )

just use gem "rapuncel", "~> 0.0.6.RC1" in your Gemfile

i've tried to make it as thin as possible:

  1. it will only be enabled if you use the :logger option for Client.new, you can't enable logging on an existing client.
  2. Use Client.new :logger => true to log to STDOUT
  3. Use Client.new :logger => :stderr to log to STDERR
  4. Use Client.new :logger => my_io_stream to log to any IO stream (i.e. an open file stream)
  5. Use Client.new :logger => Logger.new(...) for your own Logger(-compatible) instance
  6. Use Client.new :log_level => Logger::DEBUG to set the log-level, note that this has no effect unless you set the :logger option

Log-Levels:

  1. error: If raise_on_fault or raise_on_error is set to true, the respective event will be logged
  2. warn: Logs un-raised Faults and Errors
  3. info: Logs RPC method calls (method name and number of arguments)
  4. debug: Logs RPC method calls (name and inspected arguments), Logs XML Requests and Responses (this is quite verbose!)

hope this helps! if there are any problems or questions, please report!

@cice cice closed this as completed Dec 30, 2011
@cice
Copy link
Contributor

cice commented Jan 12, 2012

hi evan, i don't know if you've noticed, but i had a bug in RC2 (happened on XML-RPC faults), i released RC3. i'm testing it extensively in our production environment.

@evaneykelen
Copy link
Author

Hi Cice,

I've not been able to test this yet due to being very busy, I'll give it a whirl now!

Thx

@cice
Copy link
Contributor

cice commented Jan 12, 2012

ok thanks alot! if you have any suggestions or issues, please report back.

@evaneykelen
Copy link
Author

I've tried it and it's awesome, thanks this is a great debugging tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants