Implemented multiple logging levels and added a timestamp.