make switch log output destination configurable

I wrote the patch for OpenWRT systems that are not good at writing files.