# AppSyncFieldLogLevel

log-level for fields in AppSync.

- Source: [`aws-appsync/lib/appsync-common.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appsync/lib/appsync-common.ts#L79)
- Type last changed: v2.178.0 · 6 Feb 2025

## 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

| Member | Description |
| --- | --- |
| `NONE` | Resolver logging is disabled. |
| `ERROR` | Only Error messages appear in logs. |
| `INFO` | Info and Error messages appear in logs. |
| `DEBUG` | Debug, Info, and Error messages, appear in logs. |
| `ALL` | All messages (Debug, Error, Info, and Trace) appear in logs. |

## Referenced by

- [`AppSyncLogConfig`](/v2/docs/aws-cdk-lib.aws_appsync.AppSyncLogConfig).fieldLogLevel
