Completed logging function