Skip to content

Commit

Permalink
Add debug message in MainApplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
hotchemi committed Mar 20, 2019
1 parent 9f8217e commit d00c1ac
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion android/app/src/main/java/com/gutenberg/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import com.facebook.react.ReactApplication;
import com.horcrux.svg.SvgPackage;

import org.wordpress.android.util.AppLog;

This comment has been minimized.

Copy link
@hypest

hypest Mar 26, 2019

Contributor

👋 @hotchemi , I wonder if there's a particular reason for using AppLog instead of Android's Log. Can you elaborate? Thanks!

This comment has been minimized.

Copy link
@hotchemi

hotchemi Mar 27, 2019

Contributor

Just wanted to use AppLog.T.EDITOR but addressed🙏 8c72ce7

import org.wordpress.mobile.ReactNativeAztec.ReactAztecPackage;
import org.wordpress.mobile.ReactNativeGutenbergBridge.GutenbergBridgeJS2Parent;
import org.wordpress.mobile.ReactNativeGutenbergBridge.RNReactNativeGutenbergBridgePackage;
Expand Down Expand Up @@ -60,7 +62,22 @@ public void requestImageUploadCancel(int mediaId) {}
public void editorDidMount(boolean hasUnsupportedBlocks) {}

@Override
public void nativeLoggingHook(String message, LogLevel logLevel) {}
public void nativeLoggingHook(String message, LogLevel logLevel) {
switch (logLevel) {
case TRACE:
AppLog.d(AppLog.T.EDITOR, message);
break;
case INFO:
AppLog.i(AppLog.T.EDITOR, message);
break;
case WARN:
AppLog.w(AppLog.T.EDITOR, message);
break;
case ERROR:
AppLog.e(AppLog.T.EDITOR, message);
break;
}
}
})
);
}
Expand Down

0 comments on commit d00c1ac

Please sign in to comment.