Code cleaning
This commit is contained in:
parent
a8a564659c
commit
4c67adc46a
@ -2,6 +2,7 @@ package net.adphi.apps.parseapplication
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.util.Log
|
||||
import com.parse.ParseQuery
|
||||
import com.parse.ParseUser
|
||||
import net.adphi.apps.parseapplication.Models.CustomObject
|
||||
@ -46,9 +47,9 @@ class MainActivity : AppCompatActivity() {
|
||||
LOG.d(TAG, "Query Error: ${e.message}")
|
||||
return@findInBackground
|
||||
}
|
||||
LOG.d(TAG, "Query results: ${objects.size}")
|
||||
LOG.d(TAG, "Query results count: ${objects.size}")
|
||||
LOG.d(TAG, "Query results: $objects")
|
||||
objects.forEach { o -> LOG.d(TAG, "CustomObject : $o ${o.user?.username}") }
|
||||
objects.forEach { o -> Log.d(TAG, "CustomObject : $o ${o.user?.username}") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,13 @@ package net.adphi.apps.parseapplication.Utils
|
||||
import com.parse.ParseClassName
|
||||
import com.parse.ParseObject
|
||||
import com.parse.ParseUser
|
||||
import net.adphi.apps.parseapplication.Utils.ParseLog.Type.*
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by Philippe-Adrien on 25/03/2018.
|
||||
*/
|
||||
|
||||
@ParseClassName("Logs")
|
||||
class ParseLog() : ParseObject(){
|
||||
constructor(type: Type, TAG: String, message: String) : this() {
|
||||
@ -20,23 +22,23 @@ class ParseLog() : ParseObject(){
|
||||
|
||||
companion object {
|
||||
fun v(TAG: String, message: String) {
|
||||
ParseLog(Type.VERBOSE, TAG, message)
|
||||
ParseLog(VERBOSE, TAG, message)
|
||||
}
|
||||
fun d(TAG: String, message: String) {
|
||||
ParseLog(Type.DEBUG, TAG, message)
|
||||
ParseLog(DEBUG, TAG, message)
|
||||
}
|
||||
fun i(TAG: String, message: String) {
|
||||
ParseLog(Type.INFO, TAG, message)
|
||||
ParseLog(INFO, TAG, message)
|
||||
}
|
||||
fun w(TAG: String, message: String) {
|
||||
ParseLog(Type.WARNING, TAG, message)
|
||||
ParseLog(WARNING, TAG, message)
|
||||
}
|
||||
fun e(TAG: String, message: String) {
|
||||
ParseLog(Type.ERROR, TAG, message)
|
||||
ParseLog(ERROR, TAG, message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class Type {
|
||||
VERBOSE, DEBUG, INFO, WARNING, ERROR
|
||||
enum class Type {
|
||||
VERBOSE, DEBUG, INFO, WARNING, ERROR
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user