Logging SQL queries in android

后端 未结 9 2292
野趣味
野趣味 2020-12-04 17:45

I am using the query functions in order to build the SQL queries for my tables. Is there a way to see the actual query that is run? For instance log it somewher

9条回答
  •  伪装坚强ぢ
    2020-12-04 18:02

    adb shell setprop log.tag.SQLiteStatements VERBOSE
    

    Don't forget to restart your app after setting this property.

    It is also possible to enable logging of execution time. More details are availabe here: http://androidxref.com/4.2.2_r1/xref/frameworks/base/core/java/android/database/sqlite/SQLiteDebug.java

提交回复
热议问题