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

public class WorldLogger {

    public String filename = "";
    public FileWriter file;

    public WorldLogger(String _filename) {
        try {
            file = new FileWriter(_filename);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void log(String info) {
        try {
            file.write(info + "\n");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void close() {
        try {
            file.flush();
            file.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
