public class BucketLoggingConfiguration extends Object implements Serializable
| 构造器和说明 |
|---|
BucketLoggingConfiguration()
Creates a new bucket logging configuration, which by default is
disabled.
|
BucketLoggingConfiguration(String destinationBucketName,
String logFilePrefix)
Creates a new bucket logging configuration which enables server access
logs to be collected and stored in the specified destination bucket with
the specified log file prefix.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getDestinationBucketName()
Returns the destination bucket name for this logging configuration.
|
String |
getLogFilePrefix()
Returns the optional log file prefix.
|
boolean |
isLoggingEnabled()
Returns true if logging is enabled.
|
void |
setDestinationBucketName(String destinationBucketName)
Sets the destination bucket name for this logging configuration.
|
void |
setLogFilePrefix(String logFilePrefix)
Sets the log file prefix for this bucket logging configuration.
|
String |
toString() |
public BucketLoggingConfiguration()
Passing this new object directly to
COSClient.setBucketLoggingConfiguration(SetBucketLoggingConfigurationRequest)
will turn off bucket logging for the specified bucket.
public BucketLoggingConfiguration(String destinationBucketName, String logFilePrefix)
destinationBucketName - The name of the bucket to which to delivery server access logs
from the target bucket. This may be the same bucket for which
logging is being configured.logFilePrefix - The optional prefix to append to server access logs when they
are written to the destination bucket.public boolean isLoggingEnabled()
public String getLogFilePrefix()
public void setLogFilePrefix(String logFilePrefix)
logFilePrefix - The log file prefix for this logging configuration.public String getDestinationBucketName()
public void setDestinationBucketName(String destinationBucketName)
destinationBucketName - The destination bucket name for this logging configuration.Copyright © 2020. All rights reserved.