лог в папку с датой
SimpleDateFormat out = new SimpleDateFormat("dd-MM-yyyy");
String dateFolder = PropertyHandler.getInstance().getValue("LOGS_DIR")+File.separator +
out.format(new Date());
File f = new File(dateFolder);
f.mkdir();
String loggerPath = dateFolder+File.separator+ "log.log";
public class LogToFile {
public static void main(String args[]) {
try {
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("myfile.txt", true)));
out.println("the text");
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}