@@ -57,6 +57,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
5757 } else if ("getToken" .equals (action )) {
5858 return getToken (callbackContext );
5959 } else {
60+ Log .w (TAG , "Unknown action : " + action );
6061 return false ;
6162 }
6263 }
@@ -76,7 +77,7 @@ private boolean initialise(JSONArray args, final CallbackContext callbackContext
7677 anonymous = true ;
7778 }
7879 } catch (JSONException ex ) {
79- Log .d (TAG , "initialise: error getting options: " + ex .getMessage ());
80+ Log .e (TAG , "initialise: error getting options: " + ex .getMessage ());
8081 }
8182
8283 this .callbackContext = callbackContext ;
@@ -138,7 +139,6 @@ private void createProviderList() throws JSONException {
138139 providers .add (new AuthUI .IdpConfig .Builder (AuthUI .TWITTER_PROVIDER ).build ());
139140 }
140141 }
141-
142142 }
143143 }
144144
@@ -200,6 +200,7 @@ private AuthUI.SignInIntentBuilder buildCustomInstance() {
200200 }
201201 instance = instance .setIsSmartLockEnabled (smartLockEnabled , smartLockHints );
202202 } catch (JSONException ex ) {
203+ Log .e (TAG , "Error in buildCustomInstance " , ex );
203204 }
204205
205206 return instance ;
@@ -248,7 +249,7 @@ public void onComplete(@NonNull Task<Void> task) {
248249 }).addOnFailureListener (new OnFailureListener () {
249250 @ Override
250251 public void onFailure (@ NonNull Exception e ) {
251- Log .d (TAG , "deleteUser: failure" , e );
252+ Log .w (TAG , "deleteUser: failure" , e );
252253 raiseErrorEvent ("deleteuserfailure" , 1 , "This operation requires you to have recently authenticated. Please log out and back in and try again." );
253254 }
254255 });
@@ -285,6 +286,7 @@ private void raiseErrorEvent(String event, int code, String message) {
285286 data .put ("code" , code );
286287 data .put ("message" , message );
287288 } catch (JSONException e ) {
289+ Log .e (TAG , "Error in raiseErrorEvent " , e );
288290 }
289291 raiseEvent (callbackContext , event , data );
290292 }
@@ -303,7 +305,7 @@ private void raiseEventForUser(FirebaseUser user) {
303305 resultData .put ("photoUrl" , user .getPhotoUrl ().toString ());
304306 }
305307 } catch (JSONException e ) {
306- Log .d (TAG , e . getMessage () );
308+ Log .e (TAG , "Error in raiseEventForUser " , e );
307309 }
308310
309311 raiseEvent (callbackContext , "signinsuccess" , resultData );
@@ -342,7 +344,7 @@ private void raiseEvent(CallbackContext callbackContext, String type, Object dat
342344 event .put ("data" , data );
343345 }
344346 } catch (JSONException e ) {
345- e . printStackTrace ( );
347+ Log . e ( TAG , "Error in raiseEvent " , e );
346348 }
347349
348350 PluginResult result = new PluginResult (PluginResult .Status .OK , event );
@@ -361,6 +363,7 @@ public void onComplete(@NonNull Task<AuthResult> task) {
361363 data .put ("code" , err .getClass ().getSimpleName ());
362364 data .put ("message" , err .getMessage ());
363365 } catch (JSONException e ) {
366+ Log .e (TAG , "Error in onComplete " , e );
364367 }
365368 raiseEvent (callbackContext , "signinfailure" , data );
366369 }
0 commit comments