now wherever you want to write log, just create an instance of LogFile class by writing this code :
logFile = LogFile.getInstance();
And after that just call method :
logFile.writeToFile(String tag, int level, String message);
and pass arguement according to your app.