get_logs() now has sorting as an argument