* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
* for applicable license terms and NOTICE.txt for applicable notices.
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
Represents bucket logging configuration used to control bucket-based server access logging in Amazon S3.
For logging to be enabled for a bucket both the
logfilePrefix must not be
null, and the named bucket must exist. When both
variables are not
null, this object represents an enabled logging
configuration (as indicated by
If either the
this object represents a disabled logging configuration (as indicated by
Server access logging can be enabled or disabled with
and the current status of server access logging for a bucket can be retrieved
Passing this new object directly to
will turn off bucket logging for the specified bucket.
destinationBucketNameThe 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.
logFilePrefixThe optional prefix to append to server access logs when they are written to the destination bucket.
// Default log file prefix to the empty string if none is specified
if (logFilePrefix == null)
logFilePrefix = "";