Skip to content

Commit

Permalink
remove last log file when posting error
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoukoul committed May 12, 2020
1 parent f9800a8 commit 0e2e32f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/main/java/co/anode/anodevpn/AnodeClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ object AnodeClient {
val cjdroutelogfile = File(anodeUtil.CJDNS_PATH+"/"+ anodeUtil.CJDROUTE_LOG)
val lastlogfile = File(anodeUtil.CJDNS_PATH+"/last_anodevpn.log")
val currlogfile = File(anodeUtil.CJDNS_PATH+"/anodevpn.log")
jsonObject.accumulate("debugging_messages", "peerStats: "+CjdnsSocket.logpeerStats+"showConnections: "+CjdnsSocket.logshowConnections+"\n\nCURRENT LOG"+currlogfile.readText(Charsets.UTF_8)+"\n\nLAST LOG: "+lastlogfile.readText(Charsets.UTF_8)+"\n\nCDJROUTE LOG:"+cjdroutelogfile.readText(Charsets.UTF_8))

if (message!! == "Submit logs")
{
jsonObject.accumulate("debugging_messages", "peerStats: "+CjdnsSocket.logpeerStats+"showConnections: "+CjdnsSocket.logshowConnections+"\n\nCURRENT LOG"+currlogfile.readText(Charsets.UTF_8)+"\n\nLAST LOG: "+lastlogfile.readText(Charsets.UTF_8)+"\n\nCDJROUTE LOG:"+cjdroutelogfile.readText(Charsets.UTF_8))
} else {
jsonObject.accumulate("debugging_messages", "peerStats: "+CjdnsSocket.logpeerStats+"showConnections: "+CjdnsSocket.logshowConnections+"\n\nCURRENT LOG"+currlogfile.readText(Charsets.UTF_8)+"\n\nCDJROUTE LOG:"+cjdroutelogfile.readText(Charsets.UTF_8))
}
return jsonObject
}

Expand Down

0 comments on commit 0e2e32f

Please sign in to comment.