Add support for switching the daemon logger.
Use app sync thread.