Skip to content

Commit

Permalink
chore(app): add logging level
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmp01 committed Aug 9, 2024
1 parent 00a98d1 commit 0b33f85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def verifyStateHash = config.getProperty('build.verifyStateHash', 'false')
def writeStateHash = config.getProperty('build.writeStateHash', 'false')
def buildType = gradle.startParameter.taskNames.any { it.contains("Debug") } ? "debug" : "release"

def ksPath = config.getProperty('ks.path')
def ksPath = config.getProperty('ks.path', './')
def ksPassword = config.getProperty('ks.password')
def ksAlias = config.getProperty('ks.alias')

Expand Down Expand Up @@ -130,11 +130,12 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "io.ktor:ktor-client-core:$ktorVersion"
implementation "io.ktor:ktor-client-cio:$ktorVersion"
implementation "io.ktor:ktor-client-logging:$ktorVersion"
implementation "io.ktor:ktor-client-websockets:$ktorVersion"
implementation "io.ktor:ktor-client-okhttp:$ktorVersion"
implementation 'commons-codec:commons-codec:1.17.0'
implementation 'org.web3j:core:4.8.7-android'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
}
9 changes: 6 additions & 3 deletions app/src/main/java/proofcastlabs/tee/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
package proofcastlabs.tee

import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Bundle
import android.util.Log
import kotlinx.coroutines.runBlocking
import androidx.appcompat.app.AppCompatActivity
import io.ktor.client.*
import io.ktor.client.engine.okhttp.*
import io.ktor.client.plugins.logging.ANDROID
import io.ktor.client.plugins.logging.LogLevel
import io.ktor.client.plugins.logging.Logger
import io.ktor.client.plugins.logging.Logging
import io.ktor.client.plugins.websocket.*
import io.ktor.http.*
import io.ktor.websocket.*
Expand All @@ -24,6 +26,7 @@ import java.lang.Exception
import java.net.Inet4Address
import java.net.InetAddress
import java.time.Duration
import java.util.logging.Level

class MainActivity : AppCompatActivity() {
private external fun callCore(strongbox: Strongbox, db: DatabaseWiring, input: String): String
Expand Down Expand Up @@ -140,7 +143,7 @@ class MainActivity : AppCompatActivity() {
readTimeout(timeout)
connectTimeout(timeout)
} }

install(Logging) { level = LogLevel.ALL; logger = Logger.ANDROID }
install(WebSockets) { pingInterval = WS_PING_INTERVAL }
}

Expand Down

0 comments on commit 0b33f85

Please sign in to comment.