package com.hh.utility;

import android.content.Context;
import android.util.Log;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Wajdi Hh on 23/07/2015.
 * Consultant Mobile de www.dauphineconsulting.com
 * wajdihh@gmail.com
 */
public class PuLogger {

    public static void appendLogFile(Context pContext,String pathFile,String tag,Throwable myEx)
    {
        File logFile = new File(pathFile);
        if (!logFile.exists())
        {
            try
            {
                logFile.createNewFile();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
        }
        try
        {
            BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true));

            String content="############################################################################\n\n" +
                    ""+tag+" IN "+new SimpleDateFormat("dd/MM/yyyy  HH:mm").format(new Date().getTime());

            content+="\n\n"+Log.getStackTraceString(myEx);

            buf.append(content);
            buf.newLine();
            buf.close();
        }
        catch (IOException e)
        {e.printStackTrace();
        }
    }
}

@@ -22,40 +22,8 @@
 y;%0A%0A
-import android.content.Context;%0A
 impo
@@ -394,25 +394,8 @@
 ile(
-Context pContext,
 Stri

Remove unused arg context