src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

logging.go (3592B)


      1 // Code generated by aws/logging_generate.go DO NOT EDIT.
      2 
      3 package aws
      4 
      5 // ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where
      6 // each bit is a flag that describes the logging behavior for one or more client components.
      7 // The entire 64-bit group is reserved for later expansion by the SDK.
      8 //
      9 // Example: Setting ClientLogMode to enable logging of retries and requests
     10 //
     11 //	clientLogMode := aws.LogRetries | aws.LogRequest
     12 //
     13 // Example: Adding an additional log mode to an existing ClientLogMode value
     14 //
     15 //	clientLogMode |= aws.LogResponse
     16 type ClientLogMode uint64
     17 
     18 // Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
     19 const (
     20 	LogSigning ClientLogMode = 1 << (64 - 1 - iota)
     21 	LogRetries
     22 	LogRequest
     23 	LogRequestWithBody
     24 	LogResponse
     25 	LogResponseWithBody
     26 	LogDeprecatedUsage
     27 	LogRequestEventMessage
     28 	LogResponseEventMessage
     29 )
     30 
     31 // IsSigning returns whether the Signing logging mode bit is set
     32 func (m ClientLogMode) IsSigning() bool {
     33 	return m&LogSigning != 0
     34 }
     35 
     36 // IsRetries returns whether the Retries logging mode bit is set
     37 func (m ClientLogMode) IsRetries() bool {
     38 	return m&LogRetries != 0
     39 }
     40 
     41 // IsRequest returns whether the Request logging mode bit is set
     42 func (m ClientLogMode) IsRequest() bool {
     43 	return m&LogRequest != 0
     44 }
     45 
     46 // IsRequestWithBody returns whether the RequestWithBody logging mode bit is set
     47 func (m ClientLogMode) IsRequestWithBody() bool {
     48 	return m&LogRequestWithBody != 0
     49 }
     50 
     51 // IsResponse returns whether the Response logging mode bit is set
     52 func (m ClientLogMode) IsResponse() bool {
     53 	return m&LogResponse != 0
     54 }
     55 
     56 // IsResponseWithBody returns whether the ResponseWithBody logging mode bit is set
     57 func (m ClientLogMode) IsResponseWithBody() bool {
     58 	return m&LogResponseWithBody != 0
     59 }
     60 
     61 // IsDeprecatedUsage returns whether the DeprecatedUsage logging mode bit is set
     62 func (m ClientLogMode) IsDeprecatedUsage() bool {
     63 	return m&LogDeprecatedUsage != 0
     64 }
     65 
     66 // IsRequestEventMessage returns whether the RequestEventMessage logging mode bit is set
     67 func (m ClientLogMode) IsRequestEventMessage() bool {
     68 	return m&LogRequestEventMessage != 0
     69 }
     70 
     71 // IsResponseEventMessage returns whether the ResponseEventMessage logging mode bit is set
     72 func (m ClientLogMode) IsResponseEventMessage() bool {
     73 	return m&LogResponseEventMessage != 0
     74 }
     75 
     76 // ClearSigning clears the Signing logging mode bit
     77 func (m *ClientLogMode) ClearSigning() {
     78 	*m &^= LogSigning
     79 }
     80 
     81 // ClearRetries clears the Retries logging mode bit
     82 func (m *ClientLogMode) ClearRetries() {
     83 	*m &^= LogRetries
     84 }
     85 
     86 // ClearRequest clears the Request logging mode bit
     87 func (m *ClientLogMode) ClearRequest() {
     88 	*m &^= LogRequest
     89 }
     90 
     91 // ClearRequestWithBody clears the RequestWithBody logging mode bit
     92 func (m *ClientLogMode) ClearRequestWithBody() {
     93 	*m &^= LogRequestWithBody
     94 }
     95 
     96 // ClearResponse clears the Response logging mode bit
     97 func (m *ClientLogMode) ClearResponse() {
     98 	*m &^= LogResponse
     99 }
    100 
    101 // ClearResponseWithBody clears the ResponseWithBody logging mode bit
    102 func (m *ClientLogMode) ClearResponseWithBody() {
    103 	*m &^= LogResponseWithBody
    104 }
    105 
    106 // ClearDeprecatedUsage clears the DeprecatedUsage logging mode bit
    107 func (m *ClientLogMode) ClearDeprecatedUsage() {
    108 	*m &^= LogDeprecatedUsage
    109 }
    110 
    111 // ClearRequestEventMessage clears the RequestEventMessage logging mode bit
    112 func (m *ClientLogMode) ClearRequestEventMessage() {
    113 	*m &^= LogRequestEventMessage
    114 }
    115 
    116 // ClearResponseEventMessage clears the ResponseEventMessage logging mode bit
    117 func (m *ClientLogMode) ClearResponseEventMessage() {
    118 	*m &^= LogResponseEventMessage
    119 }