Logging and debug switch