I'm not quite sure what you mean. 
Should I move the condition for the logger out and have it work on the result?