• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Java SDK)
  4. Access Logging
  5. Disabling Bucket Logging

Disabling Bucket Logging

You can call ObsClient.setBucketLoggingConfiguration to clear logging settings of a bucket so as to disable logging of the bucket. Sample code is as follows:

String endPoint = "yourdomainname";
String ak = "*** Provide your Access Key ***";
String sk = "*** Provide your Secret Key ***";
// Create an instance of ObsClient.
ObsClient obsClient = new ObsClient(ak, sk, endPoint);

// Leave the logging settings in blank.
obsClient.setBucketLoggingConfiguration("bucketname", new BucketLoggingConfiguration());

// Close obsClient.