Merge pull request #505 from servel333/patch-1

Example of "set RestClient.log with a Ruby Logger"
This commit is contained in:
Andy Brody 2019-08-21 18:15:50 -04:00 committed by GitHub
commit 801f18de8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -601,8 +601,13 @@ $ restclient put http://example.com/resource < input_body
To enable logging globally you can:
- set RestClient.log with a Ruby Logger, or
- set an environment variable to avoid modifying the code (in this case you can use a file name, "stdout" or "stderr"):
- set RestClient.log with a Ruby Logger
```ruby
RestClient.log = STDOUT
```
- or set an environment variable to avoid modifying the code (in this case you can use a file name, "stdout" or "stderr"):
```ruby
$ RESTCLIENT_LOG=stdout path/to/my/program