@ -174,16 +174,93 @@ minio server /data
```
```
### HTTP Trace
### HTTP Trace
HTTP tracing can be enabled by using [`mc admin trace` ](https://github.com/minio/mc/blob/master/docs/minio-admin-complete-guide.md#command-trace---display-minio-server-http-trace ) command.
By default, MinIO disables the feature to log HTTP trace. You may enable this feature by setting `MINIO_HTTP_TRACE` environment variable.
Example:
Example:
```sh
```sh
export MINIO_HTTP_TRACE=/var/log/minio.log
minio server /data
minio server /data
```
```
Default trace is succinct only to indicate the API operations being called and the HTTP response status.
```sh
mc admin trace myminio
17:21:45.729309964 objectAPIHandlers.GetBucketLocation localhost:9000/vk-photos/?location= 200 OK
17:21:45.738167329 objectAPIHandlers.HeadBucket localhost:9000/vk-photos/ 200 OK
17:21:45.747676811 objectAPIHandlers.ListObjectsV1 localhost:9000/vk-photos/?delimiter=%2F& max-keys=1000& prefix= 200 OK
```
To trace entire HTTP request
```sh
mc admin trace --verbose myminio
127.0.0.1 [REQUEST objectAPIHandlers.GetBucketLocation] [17:23:21.404025835]
127.0.0.1 GET /yyy/?location=
127.0.0.1 Host: localhost:9000
127.0.0.1 Content-Length: 0
127.0.0.1 User-Agent: MinIO (linux; amd64) minio-go/v6.0.29 mc/2019-06-15T10:29:41Z
127.0.0.1 X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
127.0.0.1 X-Amz-Date: 20190619T172321Z
127.0.0.1 Authorization: AWS4-HMAC-SHA256 Credential=Q3AM3UQ867SPQQA43P2F/20190619/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=8e53d8574db3424aa00dd73637575512b250c923edcad3cbf58a727305205709
127.0.0.1
127.0.0.1 [RESPONSE] [17:23:21.404780651]
127.0.0.1 200 OK
127.0.0.1 X-Amz-Request-Id: 15A9A965FF7A7546
127.0.0.1 X-Minio-Deployment-Id: 41e39f4a-3b66-415b-9ddf-025d76a58668
127.0.0.1 X-Xss-Protection: 1; mode=block
127.0.0.1 Accept-Ranges: bytes
127.0.0.1 Server: MinIO/DEVELOPMENT.2019-06-18T17-17-02Z
127.0.0.1 Content-Type: application/xml
127.0.0.1 Vary: Origin
127.0.0.1 X-Amz-Bucket-Region: us-east-1
127.0.0.1 Content-Length: 137
127.0.0.1 Content-Security-Policy: block-all-mixed-content
127.0.0.1 <?xml version="1.0" encoding="UTF-8"?>
< LocationConstraint xmlns = "http://s3.amazonaws.com/doc/2006-03-01/" > us-east-1< / LocationConstraint > 127.0.0.1
127.0.0.1 [REQUEST objectAPIHandlers.HeadBucket] [17:23:21.412985428]
127.0.0.1 HEAD /yyy/
127.0.0.1 Host: localhost:9000
127.0.0.1 User-Agent: MinIO (linux; amd64) minio-go/v6.0.29 mc/2019-06-15T10:29:41Z
127.0.0.1 X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
127.0.0.1 X-Amz-Date: 20190619T172321Z
127.0.0.1 Authorization: AWS4-HMAC-SHA256 Credential=Q3AM3UQ867SPQQA43P2F/20190619/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=e0a02a62d39994d0206586f01dd2ab3a4aea74e60da9ff4d427629f705c62c02
127.0.0.1 Content-Length: 0
127.0.0.1
127.0.0.1 [RESPONSE] [17:23:21.413457159]
127.0.0.1 200 OK
127.0.0.1 Vary: Origin
127.0.0.1 Accept-Ranges: bytes
127.0.0.1 Content-Length: 0
127.0.0.1 X-Amz-Bucket-Region: us-east-1
127.0.0.1 X-Amz-Request-Id: 15A9A9660005982D
127.0.0.1 X-Minio-Deployment-Id: 41e39f4a-3b66-415b-9ddf-025d76a58668
127.0.0.1 X-Xss-Protection: 1; mode=block
127.0.0.1 Content-Security-Policy: block-all-mixed-content
127.0.0.1 Server: MinIO/DEVELOPMENT.2019-06-18T17-17-02Z
127.0.0.1
127.0.0.1 [REQUEST objectAPIHandlers.ListObjectsV1] [17:23:21.423153668]
127.0.0.1 GET /yyy/?delimiter=%2F& max-keys=1000& prefix=
127.0.0.1 Host: localhost:9000
127.0.0.1 Content-Length: 0
127.0.0.1 User-Agent: MinIO (linux; amd64) minio-go/v6.0.29 mc/2019-06-15T10:29:41Z
127.0.0.1 X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
127.0.0.1 X-Amz-Date: 20190619T172321Z
127.0.0.1 Authorization: AWS4-HMAC-SHA256 Credential=Q3AM3UQ867SPQQA43P2F/20190619/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=46ee3d2fc5085432b94bc3205076abd8166ffa3e35c639f84e9684c7c6a181c9
127.0.0.1
127.0.0.1 [RESPONSE] [17:23:21.424260967]
127.0.0.1 200 OK
127.0.0.1 Content-Security-Policy: block-all-mixed-content
127.0.0.1 Content-Type: application/xml
127.0.0.1 Server: MinIO/DEVELOPMENT.2019-06-18T17-17-02Z
127.0.0.1 X-Amz-Bucket-Region: us-east-1
127.0.0.1 X-Minio-Deployment-Id: 41e39f4a-3b66-415b-9ddf-025d76a58668
127.0.0.1 Accept-Ranges: bytes
127.0.0.1 Content-Length: 253
127.0.0.1 Vary: Origin
127.0.0.1 X-Amz-Request-Id: 15A9A966009F94A6
127.0.0.1 X-Xss-Protection: 1; mode=block
127.0.0.1 <?xml version="1.0" encoding="UTF-8"?>
< ListBucketResult xmlns = "http://s3.amazonaws.com/doc/2006-03-01/" > < Name > yyy< / Name > < Prefix > < / Prefix > < Marker > < / Marker > < MaxKeys > 1000< / MaxKeys > < Delimiter > /< / Delimiter > < IsTruncated > false< / IsTruncated > < / ListBucketResult >
```
## Explore Further
## Explore Further
* [MinIO Quickstart Guide ](https://docs.min.io/docs/minio-quickstart-guide )
* [MinIO Quickstart Guide ](https://docs.min.io/docs/minio-quickstart-guide )