Console logging that will only log when condition is satisfied