package io.fotoapparat.log;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Logs messages to given file.
 */
class FileLogger implements Logger {

    private final File file;
    private FileWriter writer;

    FileLogger(File file) {
        this.file = file;
    }

    @Override
    public void log(String message) {
        try {
            ensureWriterInitialized();

            writer.write(message + "\n");
            writer.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private void ensureWriterInitialized() throws IOException {
        if (writer == null) {
            writer = new FileWriter(file);
        }
    }

}

@@ -525,28 +525,21 @@
     
-e.printStackTrace();
+// Do nothing
 %0A   

Remove simple logging