#NEWLINE# def _Get( self ) : #NEWLINE# #INDENT# 'Gets logging configuration for a bucket.' #NEWLINE# ( bucket_url , bucket_metadata ) = self . GetSingleBucketUrlFromArg ( self . args [ 0 ] , bucket_fields = [ 'logging' ] ) #NEWLINE# if ( bucket_url . scheme == 's3' ) : #NEWLINE# #INDENT# sys . stdout . write ( self . gsutil_api . XmlPassThroughGetLogging ( bucket_url , provider = bucket_url . scheme ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( bucket_metadata . logging and bucket_metadata . logging . logBucket and bucket_metadata . logging . logObjectPrefix ) : #NEWLINE# #INDENT# sys . stdout . write ( ( str ( encoding . MessageToJson ( bucket_metadata . logging ) ) + '\n' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sys . stdout . write ( ( '%s has no logging configuration.\n' % self ) ) #NEWLINE# #UNINDENT# #UNINDENT# return 0