Skip to content

Commit

Permalink
fix: debugger 不发送logger_data
Browse files Browse the repository at this point in the history
  • Loading branch information
styluo committed Aug 30, 2021
1 parent 1655846 commit 16e613f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;

import com.growingio.android.sdk.track.log.CacheLogger;
import com.growingio.android.sdk.track.log.ILogger;
Expand Down Expand Up @@ -67,10 +68,14 @@ public void closeLog() {


public void printOut() {
if (Looper.myLooper() != sLogHandler.getLooper()) {
sLogHandler.post(mLogRunnable);
return;
}

if (mCacheLogger != null) {
List<LogItem> mLoggers = mCacheLogger.getCacheLogsAndClear();
if (mLoggers == null || mLoggers.size() == 0) return;
if (mCallback != null) {
if (mLoggers != null && !mLoggers.isEmpty() && mCallback != null) {
String loggerData = LoggerDataMessage.createTrackMessage(mLoggers).toJSONObject().toString();
mCallback.disposeLog(loggerData);
}
Expand Down

0 comments on commit 16e613f

Please sign in to comment.