S3 flush bucket logging

Flushes pending logging objects for a bucket. Use this operation to immediately commit log data to the target log bucket. If no log records exist to flush, then the flush operation flushes an empty log object to the target bucket.

Syntax
POST /{bucket}?logging HTTP/1.1

Response entities

The response body is XML encoded in the following format. It returns the name of the object that was flushed:
<PostBucketLoggingOutput xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <FlushedLoggingObject>string</FlushedLoggingObject>
</PostBucketLoggingOutput>

HTTP Response

404
Status Code

NoSuchBucket

Description

The bucket does not exist.

Using radosgw-admin

Use the radosgw-admin command to immediately flush and commit pending logging objects for the bucket.

The following example shows how to flush pending logging objects by using the radosgw-admin command.
# Flush pending logging objects for the source bucket
[root@ceph14 ~]# radosgw-admin bucket logging flush --bucket src-bkt1
flushed pending logging object 'src-bkt1-logs-2025-11-18-20-43-19-0000000011AEI402' to target bucket 'dest-bkt1'
[root@ceph14 ~]#