Logger tools

Move tools related to logging to scripts/util and add a tool to sort the messages in chronological order.