Implemented a naive logging function.