Android Open Source - transloadit-Android-sdk Transloadit Logger






From Project

Back to project page transloadit-Android-sdk.

License

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.

Java Source Code

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();
    }

}




Java Source Code List

hu.szabot.transloadit.ApiData.java
hu.szabot.transloadit.IApiRequest.java
hu.szabot.transloadit.IApiResponse.java
hu.szabot.transloadit.ITransloadit.java
hu.szabot.transloadit.TransloaditRequest.java
hu.szabot.transloadit.TransloaditResponse.java
hu.szabot.transloadit.Transloadit.java
hu.szabot.transloadit.assembly.AssemblyBuilder.java
hu.szabot.transloadit.assembly.IAssemblyBuilder.java
hu.szabot.transloadit.assembly.IStep.java
hu.szabot.transloadit.assembly.Step.java
hu.szabot.transloadit.assembly.exceptions.AlreadyDefinedKeyException.java
hu.szabot.transloadit.assembly.exceptions.InvalidFieldKeyException.java
hu.szabot.transloadit.exceptions.FileNotOpenableException.java
hu.szabot.transloadit.exceptions.NotParseableException.java
hu.szabot.transloadit.executor.DefaultHttpExecutor.java
hu.szabot.transloadit.executor.IRequestExecutor.java
hu.szabot.transloadit.executor.ParsedApiData.java
hu.szabot.transloadit.log.TransloaditLogger.java
hu.szabot.transloadit.parser.IRequestParser.java
hu.szabot.transloadit.parser.IResponseParser.java
hu.szabot.transloadit.parser.JSONRequestParser.java
hu.szabot.transloadit.parser.JSONResponseParser.java
hu.szabot.transloadit.utils.ShaUtils.java