Use build debug to handle when to log