Why don't you just do a string comparison against "/log" and "/log/"?