From 94e7452deacf7c5c12d915db334c74958ce02193 Mon Sep 17 00:00:00 2001 From: Kha Truong <64438356+khatruong2009@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:02:11 -0800 Subject: [PATCH 1/3] chore: moved user agent to logging category api --- .../lib/src/category/amplify_logging_category.dart | 2 +- .../lib/src/cloudwatch_logger_plugin.dart | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/amplify_core/lib/src/category/amplify_logging_category.dart b/packages/amplify_core/lib/src/category/amplify_logging_category.dart index b64714987f..a87b8dd5ca 100644 --- a/packages/amplify_core/lib/src/category/amplify_logging_category.dart +++ b/packages/amplify_core/lib/src/category/amplify_logging_category.dart @@ -61,6 +61,6 @@ class LoggingCategory extends AmplifyCategory { /// Sends recorded logs to the output and remove them from the local storage. /// {@endtemplate} void flushLogs() { - return defaultPlugin.flushLogs(); + return identifyCall(LoggingCategoryMethod.flush, () => defaultPlugin.flushLogs()); } } diff --git a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart index 1b03df8949..49b7f09715 100644 --- a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart +++ b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/cloudwatch_logger_plugin.dart @@ -389,10 +389,7 @@ class CloudWatchLoggerPlugin extends AWSLoggerPlugin /// Sends logs on-demand to CloudWatch. Future flushLogs() async { - await identifyCall( - LoggingCategoryMethod.flush, - _startSyncingIfNotInProgress, - ); + await _startSyncingIfNotInProgress(); } @override From 0a51dfe2e0e08004536649bcc489962340567237 Mon Sep 17 00:00:00 2001 From: Kha Truong <64438356+khatruong2009@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:16:57 -0800 Subject: [PATCH 2/3] chore: added trailing comma for formatting --- .../amplify_core/lib/src/category/amplify_logging_category.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amplify_core/lib/src/category/amplify_logging_category.dart b/packages/amplify_core/lib/src/category/amplify_logging_category.dart index a87b8dd5ca..651bfad283 100644 --- a/packages/amplify_core/lib/src/category/amplify_logging_category.dart +++ b/packages/amplify_core/lib/src/category/amplify_logging_category.dart @@ -61,6 +61,6 @@ class LoggingCategory extends AmplifyCategory { /// Sends recorded logs to the output and remove them from the local storage. /// {@endtemplate} void flushLogs() { - return identifyCall(LoggingCategoryMethod.flush, () => defaultPlugin.flushLogs()); + return identifyCall(LoggingCategoryMethod.flush, () => defaultPlugin.flushLogs(),); } } From 12a4e51ae1d186d702f37615deec4fdc8fa22de5 Mon Sep 17 00:00:00 2001 From: Kha Truong <64438356+khatruong2009@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:57:43 -0800 Subject: [PATCH 3/3] chore: ran dart format --- .../lib/src/category/amplify_logging_category.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/amplify_core/lib/src/category/amplify_logging_category.dart b/packages/amplify_core/lib/src/category/amplify_logging_category.dart index 651bfad283..ef55e5d945 100644 --- a/packages/amplify_core/lib/src/category/amplify_logging_category.dart +++ b/packages/amplify_core/lib/src/category/amplify_logging_category.dart @@ -61,6 +61,9 @@ class LoggingCategory extends AmplifyCategory { /// Sends recorded logs to the output and remove them from the local storage. /// {@endtemplate} void flushLogs() { - return identifyCall(LoggingCategoryMethod.flush, () => defaultPlugin.flushLogs(),); + return identifyCall( + LoggingCategoryMethod.flush, + () => defaultPlugin.flushLogs(), + ); } }