Decrease ORMlite's internal log verbosity or disable it

后端 未结 3 1034
-上瘾入骨i
-上瘾入骨i 2021-01-12 08:47

We\'re doing some heavy performance tuning in our app, hence we start using method tracing to find the bottlenecks.

At first glance Ormlite was fine, but we found t

3条回答
  •  天涯浪人
    2021-01-12 09:12

    With method tracing we saw that LocalLog was being used. As is stated on LocalLog's documentation:

    You can set the log level by setting the System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "trace").
    Acceptable values are: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.

    We couldn't set the property using adb shell so we added the following line to our Application.onCreate

    System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "ERROR");
    

    Finally we stop seeing ORMLite output on logcat and performance increased as expected.

提交回复
热议问题