build out of debug logging functionality