Browse Source

improve logging for LoganSquareJodaTimeConverter

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 năm trước cách đây
mục cha
commit
fa1360090a

+ 3 - 2
app/src/main/java/com/nextcloud/talk/models/json/converters/LoganSquareJodaTimeConverter.java

@@ -31,6 +31,7 @@ import org.joda.time.DateTime;
 import java.io.IOException;
 
 public class LoganSquareJodaTimeConverter implements TypeConverter<DateTime> {
+    private static final String TAG = LoganSquareJodaTimeConverter.class.getSimpleName();
 
     @Override
     public DateTime parse(JsonParser jsonParser) throws IOException {
@@ -41,7 +42,7 @@ public class LoganSquareJodaTimeConverter implements TypeConverter<DateTime> {
         try {
             return DateTime.parse(dateString);
         } catch (final RuntimeException exception) {
-            Log.e("NC", exception.getLocalizedMessage());
+            Log.e(TAG, exception.getLocalizedMessage(), exception);
         }
         return null;
     }
@@ -54,4 +55,4 @@ public class LoganSquareJodaTimeConverter implements TypeConverter<DateTime> {
             jsonGenerator.writeString(object != null ? object.toString() : null);
         }
     }
-}
+}