@@ -0,0 +1,1785 @@
+package cgeo.geocaching.utils;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.PrintWriter;%0A%0Apublic class LogWriter %7B%0A    private PrintWriter logWriter = null;%0A    private String prefix;%0A%0A    public LogWriter(final String prefix) %7B%0A        this.prefix = prefix;%0A        checkLogfile();%0A    %7D%0A%0A    public void log(final String info) %7B%0A        checkLogfile();%0A        if (null != logWriter) %7B%0A            logWriter.println(%22--------------------------------------------------------------------%22);%0A            logWriter.println(CalendarUtils.formatDateTime(%22yyyy-MM-dd HH:mm:ss.SSS%22));%0A            logWriter.println(info);%0A        %7D%0A    %7D%0A%0A    public void d(final String info) %7B%0A        Log.d(info);%0A        log(info);%0A    %7D%0A%0A    public void e(final String info) %7B%0A        Log.e(info);%0A        log(info);%0A    %7D%0A%0A    public void i(final String info) %7B%0A        Log.i(info);%0A        log(info);%0A    %7D%0A%0A    public void v(final String info) %7B%0A        Log.v(info);%0A        log(info);%0A    %7D%0A%0A    public void w(final String info) %7B%0A        Log.w(info);%0A        log(info);%0A    %7D%0A%0A    public void close() %7B%0A        if (null != logWriter) %7B%0A            log(%22end of logging%22);%0A            logWriter.println(%22--------------------------------------------------------------------%22);%0A            logWriter.close();%0A            logWriter = null;%0A        %7D%0A    %7D%0A%0A    private void checkLogfile() %7B%0A        if (null == logWriter && Log.isDebug()) %7B%0A            final File logfile = FileUtils.getUniqueNamedLogfile(prefix, %22txt%22);%0A            try %7B%0A                logWriter = new PrintWriter(logfile);%0A                log(%22begin logging to file %22 + logfile.getPath());%0A            %7D catch (FileNotFoundException e) %7B%0A                // ignore error%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

add LogWriter utility class