README.md in fmrest-spyke-0.15.2 vs README.md in fmrest-spyke-0.16.0

- old
+ new

@@ -150,10 +150,11 @@ `:password` | Your password | String | None `:account_name` | Alias of `:username` | String | None `:ssl` | SSL options to be forwarded to Faraday | Faraday SSL options | None `:proxy` | Proxy options to be forwarded to Faraday | Faraday proxy options | None `:log` | Log JSON responses to STDOUT | Boolean | `false` +`:log_level` | Which log level to log into | Values accepted by `Logger#level=` | `:debug` `:coerce_dates` | See section on [date fields](#date-fields-and-timezones) | Boolean \| `:hybrid` \| `:full` | `false` `:date_format` | Date parsing format | String (FM date format) | `"MM/dd/yyyy"` `:timestamp_format` | Timestmap parsing format | String (FM date format) | `"MM/dd/yyyy HH:mm:ss"` `:time_format` | Time parsing format | String (FM date format) | `"HH:mm:ss"` `:timezone` | The timezone for the FM server | `:local` \| `:utc` \| `nil` | `nil` @@ -455,11 +456,11 @@ If using `fmrest-spyke` with Rails then pretty log output will be set up for you automatically by Spyke (see [their README](https://github.com/balvig/spyke#log-output)). -You can also enable simple Faraday STDOUT logging of raw requests (useful for +You can also enable simple Faraday logging of raw requests (useful for debugging) by passing `log: true` in the options hash for either `FmRest.default_connection_settings=` or your models' `fmrest_config=`, e.g.: ```ruby FmRest.default_connection_settings = { @@ -476,10 +477,20 @@ log: true } end ``` -If you need to set up more complex logging for your models can use the +You can also pass `log_level` to connection settings to change the severity of +log output (defaults to `:debug`). + +By default fmrest-ruby logs to STDOUT or to Rails' logger object if available. +You can change this by providing your own logger object to `FmRest.logger=`: + +```ruby +FmRest.logger = Logger.new("fmrest.log") +``` + +If you need to set up more complex logging for your models you can use the `faraday` block inside your class to inject your own logger middleware into the Faraday connection, e.g.: ```ruby class LoggyBee < FmRest::Layout