1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

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

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