Mongodb log sorting

Sort the results of the log query correctly.