# logSdkState

Logs the current state of the SDK for debugging purposes.

## Syntax

```dart
Future<void> logSdkState()
```

## Returns

- `Future<void>` - Completes when the SDK state has been logged.

## Example

```dart
try {
  await SfmcSdk.logSdkState();
  print('SDK state logged to console');
} catch (e) {
  print('Failed to log SDK state: $e');
}
```

## Notes

- This method is useful for debugging and troubleshooting SDK issues.
- The logged information includes device registration status, contact key, attributes, and tags.

## Related Methods

- [enableLogging()](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/flutter_enableLogging.md)
- [disableLogging()](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/flutter_disableLogging.md)
