writer = new BufferedWriter(new FileWriter(new File(System.getProperty("java.io.tmpdir"), "log.txt")));
writer = new BufferedWriter(new FileWriter(new File(System.getProperty("java.io.tmpdir"), "GalleryRemoteLog.txt")));
	public void run() {		System.out.println("Logger thread running");		BufferedWriter writer = null;		running = true;		try {			writer = new BufferedWriter(new FileWriter(new File(System.getProperty("java.io.tmpdir"), "log.txt")));			while (running) {				Thread.sleep(sleepInterval);				while (!logLines.isEmpty()) {					String s = (String) logLines.remove(0);					writer.write(s);					writer.newLine();					if (toSysOut) {						System.out.println(s);					}				}				writer.flush();			}		} catch (IOException e) {			System.err.println("Can't write to log file. Disabling log...");			maxLevel = -1;		} catch (InterruptedException e) {			System.err.println("Logger thread killed");		} finally {			running = false;			try {				if (writer != null) {					writer.close();				}			} catch (IOException e) {				e.printStackTrace();			}		}		System.out.println("Logger thread shutting down");	}