Implementing logging for debug level