![](../icons/collapse_all.gif)
C# |
public EnableBucketLoggingResponse EnableBucketLogging( EnableBucketLoggingRequest request )
![](../icons/collapse_all.gif)
- request (EnableBucketLoggingRequest)
- The EnableBucketLoggingRequest that defines the parameters of the operation.
![](../icons/collapse_all.gif)
![](../icons/collapse_all.gif)
An Amazon S3 bucket can be configured to create access log records for the requests made against it. An access log record contains details about the request such as the request type, the resource with which the request worked, and the time and date that the request was processed. Server access logs are useful for many applications, because they give bucket owners insight into the nature of requests made by clients not under their control.
Changes to the logging status for a bucket are visible in the configuration API immediately, but they take time to actually affect the delivery of log files. For example, if you enable logging for a bucket, some requests made in the following hour might be logged, while others might not. Or, if you change the target bucket for logging from bucket A to bucket B, some logs for the next hour might continue to be delivered to bucket A, while others might be delivered to the new target bucket B. In all cases, the new settings will eventually take effect without any further action on your part.
![](../icons/collapse_all.gif)
Exception | Condition |
---|---|
ArgumentNullException | |
WebException | |
AmazonS3Exception |