Skip to content

Commit

Permalink
Added Logging Dependency, Gradle Import Guide (#7479)
Browse files Browse the repository at this point in the history
Co-authored-by: JoonWon Choi <[email protected]>
Co-authored-by: Scott Rees <[email protected]>
  • Loading branch information
3 people authored May 3, 2024
1 parent bd4dccd commit 151f083
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ The escape hatch provides access to the underlying `CloudWatchLogsClient` instan

**Gradle Imports**

```groovy
implementation "aws.sdk.kotlin:cloudwatchlogs:KOTLIN_SDK_VERSION"
```kotlin title="app/build.gradle.kts"
implementation("aws.sdk.kotlin:cloudwatchlogs:KOTLIN_SDK_VERSION")
```

<BlockSwitcher>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,39 @@ The Amplify Logger enables you to troubleshoot and debug issues with your apps,



* An Android application targeting at least Android SDK API level 24 with Amplify libraries integrated
* An Android application targeting Android SDK API level 24 (Android 7.0) or above with Amplify libraries integrated
* For a full example, please follow the [quickstart](/android/start/quickstart/).
* The Amplify Logger is available for versions 2.11.0 and beyond of the Amplify Android SDK

### Install the Amplify library

Expand **Gradle Scripts**, open **build.gradle (Module: app)**. You will already have configured Amplify by following the steps in the [quickstart guide](/[platform]/start/quickstart/).

Add these libraries into the `dependencies` block:
```kotlin title="app/build.gradle.kts"
android {
compileOptions {
// Support for Java 8 features
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}

dependencies {
// Amplify API dependencies
// highlight-start
implementation("com.amplifyframework:aws-auth-cognito:ANDROID_VERSION")
implementation("com.amplifyframework:aws-logging-cloudwatch:ANDROID_VERSION")
// highlight-end
// ... other dependencies
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
}
```

`aws-auth-cognito` is used to provide authentication for Amazon CloudWatch.

Click **Sync Now**.

</InlineFilter>

Expand Down

0 comments on commit 151f083

Please sign in to comment.