Index: /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py	(revision 8591)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py	(revision 8592)
@@ -209,5 +209,5 @@
             if RE_LOGFILE_BACKUP_NAME.match(name):
                 files.append(name)
-        return sorted(files, key=numerical_suffix)
+        return sorted(files, key=numerical_suffix, reverse=True)
 
     def queryLogfiles(self, basename, query=None, limit=0, start=0):
@@ -220,6 +220,6 @@
         All logfiles with name `basename` and maybe some numerical
         extension ('.1', '.2', ...) are searched for the `query` term
-        in correct order. So, if you ask for a basename 'app.log',
-        then any file named 'app.log', 'app.log.1', 'app.log.2',
+        in correct chronological order. So, if you ask for a basename 'app.log',
+        then any file named 'app2.log', 'app.log.1', 'app.log',
         etc. will be searched in that order.
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py	(revision 8591)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py	(revision 8592)
@@ -36,5 +36,5 @@
         # write 100 messages into logfile, with 50 containing 'Msg'
         path = self.logpath
-        for m in range(num):
+        for m in range(num-1,-1,-1):
             fp = open(path, 'wb')
             for n in range(50*m, 50*m+50):
@@ -62,7 +62,7 @@
         # We can find entries in multiple logfiles (backups)
         datacenter = DataCenter()
-        open(self.logpath, 'wb').write('Msg 1\n')
+        open(self.logpath, 'wb').write('Msg 3\n')
         open(self.logpath + '.2', 'wb').write('Msg 2\n')
-        open(self.logpath + '.10', 'wb').write('Msg 3\n')
+        open(self.logpath + '.10', 'wb').write('Msg 1\n')
         result = list(datacenter.queryLogfiles('myapp.log', 'Msg'))
         # entry of logfile .10 comes after entry of logfile .2
