Added logging facilities

This patch introduces the print_log() facility, which pretty-prints log information to stdout and any logging files specified by the user.