Back to project page transloadit-Android-sdk.
The source code is released under:
MIT License
If you think the Android project transloadit-Android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package hu.szabot.transloadit.log; /*from w w w . j a v a2 s . c o m*/ import android.util.Log; /**Transloadit logger*/ public class TransloaditLogger { /** * Logs information during application processes * @param type Type of the class, where the log is proceed * @param message Parameterized info message * @param parameters Parameters for the passed info message */ public static void logInfo(Class<?> type, String message, Object... parameters) { Log.i(type.getName(), String.format(message, parameters)); } /** * Logs errors during application processes * @param type Type of the class, where the log is proceed * @param exception Exception, which is the reason of the error * @param message Parameterized error message * @param parameters Parameters for the passed error message */ public static void logError(Class<?> type, Exception exception, String message, Object... parameters) { Log.e(type.getName(), String.format(message, parameters)+" - "+exception.getMessage()); exception.printStackTrace(); } /** * Logs errors during application processes * @param type Type of the class, where the log is proceed * @param message Parameterized error message * @param parameters Parameters for the passed error message */ public static void logError(Class<?> type, String message, Object... parameters) { Log.e(type.getName(), String.format(message, parameters)); } /** * Logs errors during application processes * @param type Type of the class, where the log is proceed * @param exception Exception, which is the reason of the error */ public static void logError(Class<?> type, Exception exception) { Log.e(type.getName(),exception.getMessage()); exception.printStackTrace(); } }