Skip to content
v2.275.0

AppSyncFieldLogLevel Enum ​

log-level for fields in AppSync.

Example ​

ts
import * as logs from 'aws-cdk-lib/aws-logs';

const apiKeyProvider: appsync.AppSyncAuthProvider = {
  authorizationType: appsync.AppSyncAuthorizationType.API_KEY,
};

const api = new appsync.EventApi(this, 'api', {
  apiName: 'Api',
  ownerContact: 'OwnerContact',
  authorizationConfig: {
    authProviders: [
      apiKeyProvider,
    ],
    connectionAuthModeTypes: [
      appsync.AppSyncAuthorizationType.API_KEY,
    ],
    defaultPublishAuthModeTypes: [
      appsync.AppSyncAuthorizationType.API_KEY,
    ],
    defaultSubscribeAuthModeTypes: [
      appsync.AppSyncAuthorizationType.API_KEY,
    ],
  },
  logConfig: {
    fieldLogLevel: appsync.AppSyncFieldLogLevel.INFO,
    retention: logs.RetentionDays.ONE_WEEK,
  },
});

api.addChannelNamespace('default');

Members ​

MemberDescription
NONEResolver logging is disabled.
ERROROnly Error messages appear in logs.
INFOInfo and Error messages appear in logs.
DEBUGDebug, Info, and Error messages, appear in logs.
ALLAll messages (Debug, Error, Info, and Trace) appear in logs.

Referenced by ​

  • AppSyncLogConfig.fieldLogLevelfield_log_levelfieldLogLevelFieldLogLevelFieldLogLevel