Factor out common string match code for POSIX log enable/disable