diff --git a/packages/logging/amplify_logging_cloudwatch/example/lib/main.dart b/packages/logging/amplify_logging_cloudwatch/example/lib/main.dart index 9688db8f97..65b89cc2cc 100644 --- a/packages/logging/amplify_logging_cloudwatch/example/lib/main.dart +++ b/packages/logging/amplify_logging_cloudwatch/example/lib/main.dart @@ -39,7 +39,7 @@ class _MyAppState extends State { MacOSSecureStorageOptions(useDataProtection: false), ), ); - final loggingPlugin = AmplifyCloudWatchLoggerPlugin( + final loggingPlugin = AmplifyLoggingCloudwatch( CloudWatchPluginConfig.fromJson( jsonDecode(loggingconfig) as Map, ), diff --git a/packages/logging/amplify_logging_cloudwatch/lib/src/amplify_logging_cloudwatch_impl.dart b/packages/logging/amplify_logging_cloudwatch/lib/src/amplify_logging_cloudwatch_impl.dart index 5e5a3bfe6c..adf251c55f 100644 --- a/packages/logging/amplify_logging_cloudwatch/lib/src/amplify_logging_cloudwatch_impl.dart +++ b/packages/logging/amplify_logging_cloudwatch/lib/src/amplify_logging_cloudwatch_impl.dart @@ -6,9 +6,9 @@ import 'package:amplify_logging_cloudwatch/src/path_provider/flutter_path_provid import 'package:amplify_logging_cloudwatch_dart/amplify_logging_cloudwatch_dart.dart'; /// {@macro amplify_logging_cloudwatch_dart.cloudwatch_logger_plugin} -class AmplifyCloudWatchLoggerPlugin extends CloudWatchLoggerPlugin { +class AmplifyLoggingCloudwatch extends AmplifyLoggingCloudWatchDart { /// {@macro amplify_logging_cloudwatch_dart.cloudwatch_logger_plugin} - AmplifyCloudWatchLoggerPlugin( + AmplifyLoggingCloudwatch( super.pluginConfig, { super.remoteLoggingConstraintProvider, FutureOr Function()? logStreamNameProvider, @@ -31,14 +31,14 @@ class AmplifyCloudWatchLoggerPlugin extends CloudWatchLoggerPlugin { /// A plugin key which can be used with `Amplify.Logging.getPlugin` to retrieve /// a CloudWatch-specific Logging category interface. /// {@endtemplate} - static const LoggingPluginKey pluginKey = + static const LoggingPluginKey pluginKey = _AmplifyCloudWatchLoggerPluginKey(); } class _AmplifyCloudWatchLoggerPluginKey - extends LoggingPluginKey { + extends LoggingPluginKey { const _AmplifyCloudWatchLoggerPluginKey(); @override - String get runtimeTypeName => 'AmplifyCloudWatchLoggerPluginKey'; + String get runtimeTypeName => 'AmplifyLoggingCloudwatchKey'; } diff --git a/packages/logging/amplify_logging_cloudwatch_dart/lib/src/amplify_logging_cloudwatch_dart_impl.dart b/packages/logging/amplify_logging_cloudwatch_dart/lib/src/amplify_logging_cloudwatch_dart_impl.dart index e93e56b4d7..fbefe68024 100644 --- a/packages/logging/amplify_logging_cloudwatch_dart/lib/src/amplify_logging_cloudwatch_dart_impl.dart +++ b/packages/logging/amplify_logging_cloudwatch_dart/lib/src/amplify_logging_cloudwatch_dart_impl.dart @@ -52,9 +52,9 @@ typedef _LogBatch = (List logQueues, List logEvents); /// {@template amplify_logging_cloudwatch_dart_dart.cloudwatch_logger_plugin} /// An [AWSLoggerPlugin] for sending logs to AWS CloudWatch Logs. /// {@endtemplate} -class CloudWatchLoggerPlugin extends LoggingPluginInterface with AWSDebuggable { +class AmplifyLoggingCloudWatchDart extends LoggingPluginInterface with AWSDebuggable { /// {@macro amplify_logging_cloudwatch_dart.cloudwatch_logger_plugin} - CloudWatchLoggerPlugin( + AmplifyLoggingCloudWatchDart( CloudWatchPluginConfig pluginConfig, { RemoteLoggingConstraintProvider? remoteLoggingConstraintProvider, FutureOr Function()? logStreamNameProvider, @@ -428,22 +428,22 @@ class CloudWatchLoggerPlugin extends LoggingPluginInterface with AWSDebuggable { } @override - String get runtimeTypeName => 'CloudWatchLoggerPlugin'; + String get runtimeTypeName => 'AmplifyLoggingCloudWatchDart'; /// {@template amplify_logging_cloudwatch_dart.plugin_key} /// A plugin key which can be used with `Amplify.Logging.getPlugin` to retrieve /// a CloudWatch-specific Logging category interface. /// {@endtemplate} - static const LoggingPluginKey pluginKey = + static const LoggingPluginKey pluginKey = _CloudWatchLoggerPluginKey(); } class _CloudWatchLoggerPluginKey - extends LoggingPluginKey { + extends LoggingPluginKey { const _CloudWatchLoggerPluginKey(); @override - String get runtimeTypeName => 'CloudWatchLoggerPluginPluginKey'; + String get runtimeTypeName => 'AmplifyLoggingCloudWatchDartKey'; } extension on QueuedItem { diff --git a/packages/logging/amplify_logging_cloudwatch_dart/test/cloudwatch_logger_plugin_test.dart b/packages/logging/amplify_logging_cloudwatch_dart/test/cloudwatch_logger_plugin_test.dart index 68c7207b3a..701baf60a7 100644 --- a/packages/logging/amplify_logging_cloudwatch_dart/test/cloudwatch_logger_plugin_test.dart +++ b/packages/logging/amplify_logging_cloudwatch_dart/test/cloudwatch_logger_plugin_test.dart @@ -16,7 +16,7 @@ void main() { late MockCloudWatchLogsClient mockCloudWatchLogsClient; late MockQueuedItemStore mockQueuedItemStore; late MockCloudWatchLogStreamProvider mockCloudWatchLogStreamProvider; - late CloudWatchLoggerPlugin plugin; + late AmplifyLoggingCloudWatchDart plugin; late MockSmithyOperation mockPutLogEventsOperation; late DependencyManager dependencyManagerOverride; late MockAuthProviderRepo mockAuthProviderRepo; @@ -93,7 +93,7 @@ void main() { .getAuthProvider(APIAuthorizationType.iam.authProviderToken), ).thenReturn(mockIamAuthProvider); - plugin = CloudWatchLoggerPlugin( + plugin = AmplifyLoggingCloudWatchDart( pluginConfig, dependencyManagerOverride: dependencyManagerOverride, );