--- android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java 2011/04/19 16:19:45 1310 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java 2011/04/19 16:31:11 1311 @@ -61,21 +61,26 @@ protected File[] getFiles(int count) { File accessLogDir = new File("/home/app/domain1/logs/access/"); + //File accessLogDir = new File("/home/torben/inst/glassfishv3/glassfish/domains/domain1/logs/access/"); File logFiles[] = accessLogDir.listFiles( new FilenameFilter() { @Override public boolean accept(File dir, String name) { + //log.info("name:" + name); return name.startsWith("server_access_log"); } }); + Arrays.sort(logFiles); + if (logFiles == null) { File[] empty = {}; + log.info("file array was empty"); return empty; } - int from = logFiles.length - count; - int to = logFiles.length-1; + int from = logFiles.length - (count); + int to = logFiles.length; return Arrays.copyOfRange(logFiles, from, to); } @@ -350,7 +355,7 @@ key = "kmldata-multi"; } - kmlData = cache.get(key); + kmlData = null;// = cache.get(key); if (kmlData == null) { kmlData = formatXml( getRequestsFromFileWorker(multiple) );