Disabling Bucket Logging

You can call setBucketLogging to delete all logs of a bucket so as to disable logging of the bucket. Sample code is as follows:

static OBSClient *client;
NSString *endPoint = @"your-endpoint";
NSString *SK = @"*** Provide your Secret Key ***";
NSString *AK = @"*** Provide your Access Key ***";
    
// Initialize identity authentication.
OBSStaticCredentialProvider *credentialProvider = [[OBSStaticCredentialProvider alloc] initWithAccessKey:AK secretKey:SK];
    
//Initialize service configuration.
OBSServiceConfiguration *conf = [[OBSServiceConfiguration alloc] initWithURLString:endPoint credentialProvider:credentialProvider];
    
// Initialize an instance of OBSClient.
client = [[OBSClient alloc] initWithConfiguration:conf];
    
OBSSetBucketLoggingRequest *request = [[OBSSetBucketLoggingRequest alloc]initWithBucketName:@"bucketname"];
    
[client setBucketLogging:request completionHandler:^(OBSSetBucketLoggingResponse *response, NSError *error){
    NSLog(@"%@",response);
 }];